0

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.

ppoliani
  • 4,792
  • 3
  • 34
  • 62

0 Answers0