0

I'm using regex in Javascript to verify that an entry in a textbox only contains legal characters. My expression is:

/[a-zA-Z0-9._%+@-]$/.test(value)

This correctly identifies cases like "~~~" or "4389sdf~~~", but if there are any legal characters following, such as "~~~bvv" then it gets a pass.

How can I fix this?

Nicholas Hassan
  • 949
  • 2
  • 10
  • 27

0 Answers0