You are here

constant SpamspanInterface::PATTERN_MAIN in SpamSpan filter 8

Same name and namespace in other branches
  1. 8.2 src/SpamspanInterface.php \Drupal\spamspan\SpamspanInterface::PATTERN_MAIN

Set up a regex constant to split an email 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.

File

src/SpamspanInterface.php, line 23

Class

SpamspanInterface
Spamspan interface.

Namespace

Drupal\spamspan

Code

const PATTERN_MAIN = '([' . self::PATTERN_SPECIAL . '\\w]+)@' . '((?:' . '[-\\w]+\\.' . ')+' . '[A-Z]{2,63})';