Hi All
I'm trying to come up with a regex for validating allowed characters in a form field.
The idea is that if any characters other than those in the approved list are entered in the field, then the form will return an error and message.
I don't know regex from a hole in the ground. So, I'm hoping that someone might have some good ideas about this.
Here is the list of approved characters:
$ALLOWED_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw xyz&#!(-)'+/=?:@\""
Yes, the double quote is also allowed and it is escaped near the end.
What would be a good regex to test for these allowed chars?
Many thanks
