Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
[[:alnum:]\_\.\-]+@[[:alnum:]\-]+\.[[:alpha:]]{2,3}
/
gm

Description

matches any letters or numbers '-' '_' '.' in prefix @ letters or numbers '-' in domain . 2 or 3 letters in suffix useful for getting emails from files that include emails

Submitted by anonymous - 5 years ago