I need php regular expression to allow the all leters, numbers, dollar sign, commas, double & single quotes [closed]

Rather than stripping all special characters, you can simply match the required character, and that would be smaller regex.

You can use this:

/^[a-zA-Z0-9$,"']+$/

Leave a Comment