I am using javascript regex to do some data validation and specify the characters that i want to accept (I want to accept any alphanumeric characters, spaces and the followi
I'm not sure what you want but I don't think your current regexp does what you think it does:
It tries to find one character is not A-z0-9 "!&,'\- (^ means not).
A-z0-9 "!&,'\-
^
not
Also, I'm not even sure what A-z matches. It's either a-z or A-Z.
A-z
a-z
A-Z
So your current regexp matches strings like "." and "Hi." but not "Hi"
"."
"Hi."
"Hi"