[TriLUG] [hopefully] quickie help with a regex

wejii wejii at bellsouth.net
Tue Aug 10 17:58:53 EDT 2010


This seems to work for ascii letters, digits, and whitespace -

   preg_match_all('/\'[a-zA-Z0-9\s]*\'/', $input, $result);

Other characters like &, $, @, ... may be included if you want. 
I am uncomfortable using the dot "." feature for several reasons. Here is one:



More information about the TriLUG mailing list