"Andrey Hristov" <[EMAIL PROTECTED]> wrote in message

> In PHP 4.0.5 and later, every parameter to str_replace() can be an
array.If search and

Thank you for pointing that out :)

I've now changed my code from the (rather lengthy) version to the following
which worked perfectly for me:

$regcheck = array("/","\\","^",".","[","]","$","(",")","*","?","{","}");
$regreplace =
$badwordtest = "/" . str_replace($regcheck,$regreplace,$badwords[$i]) .

> BTW /abc/ and ~abc~ are equivalent regexes. So get a character which will
not occur in the string and put in the front and the end.

Does this mean that ~myword~ and /myword/ are identical?
I only used /myword/ because it's in the php manual example like that.


Fatal Design
Atari / DarkBASIC / Coding / Since 1995

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to