looking a regular expresion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux