I want to write a regex in JavaScript that will pass only for the strings that have the following characters
a-z, A-Z, 0-9, _, -, ., Spaces, ', ? and &
I tried /[\w-\.\s\'\?\&]+/ but when testing it against the re.test("*dfs*d") it returns true.
I want to write a regex in JavaScript that will pass only for the strings that have the following characters
a-z, A-Z, 0-9, _, -, ., Spaces, ', ? and &
I tried /[\w-\.\s\'\?\&]+/ but when testing it against the re.test("*dfs*d") it returns true.
