Re: Regular Expression by Exception

From: Date: Tue, 05 Aug 2008 05:56:16 +0000
Subject: Re: Regular Expression by Exception
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-277698@lists.php.net to get a copy of this message
I don't know how to use the POSIX classes, but if you use preg_replace: preg_replace("/[^$params]/", '', $string); I think this will work. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Alberto García Gómez wrote: > Fellows: > > If I use ereg_replace($params, $string) I can replace the char that > match with $params in the $string. > > BUT, how I can replace ALL chars EXCEPT the chars in $params. > > Something like !$params, I think > >

« previous php.general (#277698) next »