n8dog
asked on
String Filter...
i need to filter out swear words for my chat app...
anyone?
-n
anyone?
-n
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
ah nevermind, i will just make them all lower case.
thanks man!
-n8D
thanks man!
-n8D
you can try using preg_replace:
$swear_words = array('word1','word2');
$preg = '/('.implode('|', $swear_words).')/i';
$string = preg_replace($preg, '***', $string);
-r-
$swear_words = array('word1','word2');
$preg = '/('.implode('|', $swear_words).')/i';
$string = preg_replace($preg, '***', $string);
-r-
ASKER
u rock!
ASKER
dont suppose youve worked with the ActiveX embed fix?
-n
-n
You mean for flash?
-r-
-r-
ASKER
yeah...i found the fix straight forward, but it wouldnt work for me.
thought id ask while you were on
-n
thought id ask while you were on
-n
I know of it's existence but I haven't looked into it yet to be honest.
-r-
-r-
ASKER
no problem - well thanks for the assistance on that string replace
after 3 weeks of around the clock coding, my head is melting...
-n
after 3 weeks of around the clock coding, my head is melting...
-n
ASKER
-n