Regex to remove all special chars... EXCEPT spaces
Posted: Wed Jun 11, 2008 3:40 pm
I'm using a regular expression to remove all special characters from a string, however, I want to be able to leave spaces in the string, any ideas?
Code: Select all
preg_replace("/[^a-zA-Z0-9s]/", "", $pagTitle);