looking a regular expresion

From: Date: Tue, 27 May 2008 19:05:47 +0000
Subject: looking a regular expresion
Groups: php.general 
Request: Send a blank email to php-general+get-274751@lists.php.net to get a copy of this message
Hello: I need to include a pair of negations with two complete word into a regular expresion for preg_replace. How to do this? I want to replace "I want to be a SUN and a SIR" with "FRIKI FRIKI FRIKI FRIKI FRIKI SUN FRIKI FRIKI SIR" ie. the words are: SUN and SIR. And the replacement word is: FRIKI $st = preg_replace ("\b([^S][^U][^N])|([^S][^I][^R]\b)", "FRIKI",$st); This does not match Anyone hep me? Thanks

« previous php.general (#274751) next »