You are here

constant SPAMSPAN_EMAIL in SpamSpan filter 7

Same name and namespace in other branches
  1. 6 spamspan.module \SPAMSPAN_EMAIL

Set up a regex constant to split an email address into name and domain parts. The following pattern is not perfect (who is?), but is intended to intercept things which look like email addresses. It is not intended to determine if an address is valid. It will not intercept addresses with quoted local parts.

@constant string SPAMSPAN_EMAIL

2 uses of SPAMSPAN_EMAIL
spamspan_admin::output in ./spamspan_admin.php
A helper function for the callbacks
_spamspan_filter_process in ./spamspan.module
Spamspan filter process callback

File

./spamspan.module, line 25
This module implements the spamspan technique (http://www.spamspan.com ) for hiding email addresses from spambots.

Code

define('SPAMSPAN_EMAIL', "\n      ([-\\.\\~\\'\\!\\#\$\\%\\&\\+\\/\\*\\=\\?\\^\\_\\`\\{\\|\\}\\w\\+^@]+) # Group 1 - Match the name part - dash, dot or\n                           #special characters.\n     @                     # @\n     ((?:        # Group 2\n       [-\\w]+\\.            # one or more letters or dashes followed by a dot.\n       )+                  # The whole thing one or more times\n       [A-Z]{2,63}         # with between 2 and 63 letters at the end (NB\n                           # new TLDs)\n     )\n");