It needs to be escaped

Report a typo

Select all the correct ways to escape special characters.

A)

let regex = new RegExp('this one is correct\?');

B)

let regex = /this one is incorrect\?/;

C)

let regex = /I'm not right\\?/;

D)

let regex = new RegExp('I swear this one is right\\.');
Select one or more options from the list
___

Create a free account to access the full topic