Hello Curt,

Sunday, April 25, 2004, 4:28:37 PM, you wrote:

CZ> Also instead of str_replace scanning the whole string  5 time to
CZ> replace the 5 items, its only scanned once, replacing up to five
CZ> things.

My method *did* only scan the string once and str_replace is
definitely faster than preg_replace.

But I agree with the preg use for more complex word catching, but even
using that method you could spend ages building up a definitive
"badwords" array. I guess it depends how anal you want to be ;) (heh)

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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

Reply via email to