Email obfuscation detection

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
capneb
Forum Newbie
Posts: 1
Joined: Sun Dec 02, 2007 6:05 am

Email obfuscation detection

Post by capneb »

I'd like to be able detect people trying to save email addresses in a particular field, both obfuscated (i.e. user_NOSPAM [AT] example (DOT) com ) and plain text, since I don't want them to be able to put any form of email address in this field. Now I've grabbed the list of TLDs from iana.org, and built a small function with a for loop that does quite a lot of stripos string searches for things like '[dot]'.$tld, etc. But I was curious if anyone has run across such a function that is more exhaustive and proven to work. I realize this will not be infallible, but I want to put up some sort of guard against this. Thanks.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Email obfuscation detection

Post by josh »

Good luck. Human beings are exceedingly efficient at creating languages. You should write an inclusive filter, not an exclusive filter. By the way, you've received a collect call from "bob wehadababyitsaboy"
http://www.youtube.com/watch?v=flP-o0ydkvo
Post Reply