$num=count($bannedwords);
            for($i=0;$i<$num-1;$i++)
            {
                $string =
eregi_replace("\b$bannedwords[$i]\b","[censored]",$string);
            }


For whatever reason, no word in $bannedwords will match in the string.  I've
tested it with simple expressions like "\btest\b" and it will not match the
word "test".  Does it have something to do with the 2 "\b"s found in the
code?  After removing them, it replaces all instances of $bannedwords, even
in the middle of words, which is not good.  Any suggestions?


TIA,

Neal


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to