pritaeas
Posting Expert
5,483 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
For the backslash it would look like this:
preg_match('%[^a-zA-Z0-9-_.,!()\'"\\\\/]%s', $subject)
As mentioned in the first note in the first link, first escape for the regex, and then for the php string.
pritaeas
Posting Expert
5,483 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
pritaeas
Posting Expert
5,483 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875