0

I have jquery text editor on a job posting page, but would like to not allow users to include email or Web address in text, so that traffic goes through sites application process.

I'm stuck on trying to achieve this, and I understand will more than likely need a script to check through text, but can't seem to find any reference to achieving this specifically.

Any help / direction greatly appreciated. :)

Edward P
  • 35
  • 3

1 Answers1

0

Email address validation is a very difficult problem (the format of SMTP addresses predates SMTP, so "valid" email addresses can be quite complex: Using a regular expression to validate an email address)

The quick-and-dirty way is to simply check for this regex: (\w+)@(\w+)\.(\w+). you'll also want to check for common obfuscations, such as -at-, [at], AT (e.g. foobar-at-gmail[dot]com).

But universal detection of obfuscated email addresses is largely an unsolved problem, and possibly impossible to solve, so the best solution is a simple trivial filter like what I just described, followed by manual human moderation. You can probably farm this out to Amazon Mechanical Turk, e.g. "$0.05 per paragraph to see if it contains an obfuscated email address"

Community
  • 1
  • 1
Dai
  • 141,631
  • 28
  • 261
  • 374