Hello,
I am writing a program and want to include a filter for cuss words but I have no idea how to do this. I would be incredibly greatful if someone could show me some example code or something.
Try using regexp, something like this:
<?PHP $str = "This is a test sentence with a swear in it. For this test, the swear will be beep or bleep."; $str = preg_replace("/\\b(beep|bleep)\\b/", "****", $str); echo $str; ?>
Or search the forums for the word "censor".
Originally posted by Weedpacket Or search the forums for the word "censor".
ahh come on, you don't really think that someone is really gonna UTSL, do ya weed, LOL
Lol... doesn't happen often, does it?
Hmm, I thought forum-searching was RTFF or STFF ... :eek:
Pyro, according to Leatherback's poll in the EL, everybody does it....
ROFL, myself....
laughs
well, we all know that polls lie... 😉