> thinking it may be easier to parse for only allowed characters.
*much* better idea. Try:
preg_match('/[^\w]/', $string)
to find all non-alphanumeric+underscore
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Dave) wrote:
> Cannot seem to get a regex to check a string for the following
>
> space tab ' " ! @ # $ % ^ & * ( ) + = : ; / \
>
> if(preg_match('[\'" ,!@#$%\^&*()+=:;/\\]',$mystring))
You need pattern delimiters with preg_* expression
2 matches
Mail list logo