I've been trying to develop some regex's to match bad words. Just comparing against a list of bad words doesn't work that well, because I would have to include every possible use of a curseword, ie: bullshit, shit, shithead, etc. Plus looping through every word in the list would invariably be slow.
Here is an example of one such regex:

/(?:bull)shit/i

My problem here is getting the ending on there. I want this regex to also match the words, shithead, shitter, etc, etc.

I know I could just have it match on the word shit, but this wouldn't work for the word ass as it is located within words, such as harassment or class. I'm not very good with the regex's and I was wondering if some of you gurus could just help me cheat ;)


SkyBlueshoes




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to