preg_match('/[^a-z0-9]/i', $stringToSearch);

http://www.php.net/preg_match

> -----Original Message-----
> From: Matt Babineau [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 17, 2002 10:56 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Searching a string for everything but a-z and 0-9
> 
> 
> Cold Fusion has RegEx to do this with. If I want to search a 
> string looking for anything non 0-9 and non a-z what should I 
> be looking at? Could I do:
>  
> $EXPR = "non a-z, non numerical";
> strstr($SEARCH_STRING, $EXPR)
>  
> I hope this makes sense, I am not sure what PHP calls this 
> type of searching but in Cold Fusion it is called REGEX. Any 
> suggestions on where I can look in the php documentation to 
> read more about this?
>  
> Matt Babineau
> MCWD / CCFD
> -----------------------------------------
> e:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> p: 603.943.4237
> w:  <http://www.criticalcode.com/> 
> http://www.criticalcode.com PO BOX 601 > Manchester, NH 03105
>  
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to