RE: [PHP-WIN] Searching a string for everything but a-z and 0-9

From: Date: Wed, 17 Jul 2002 18:08:30 +0000
Subject: RE: [PHP-WIN] Searching a string for everything but a-z and 0-9
Groups: php.windows 
Request: Send a blank email to php-windows+get-14819@lists.php.net to get a copy of this message
preg_match('/[^a-z0-9]/i', $stringToSearch); http://www.php.net/preg_match > -----Original Message----- > From: Matt Babineau [mailto:matt@criticalcode.com] > Sent: Wednesday, July 17, 2002 10:56 AM > To: php-windows@lists.php.net > 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:matt@criticalcode.com> matt@criticalcode.com > p: 603.943.4237 > w: <http://www.criticalcode.com/> > http://www.criticalcode.com PO BOX 601 > Manchester, NH > 03105 > >

« previous php.windows (#14819) next »