Reputation: 14575
I'm trying to check for a plus sign using PHP and regular expressions.
Here is the code I got so far.
preg_replace('#[^-a-zA-Z0-9_&; ]#', '', $abcd)
Upvotes: 4
Views: 3732
Reputation: 82903
Add a + to the list.
preg_replace('#[^-a-zA-Z0-9_&; +]#', '', $abcd)
Upvotes: 0