Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
[\w\.-]+@[\w\.-]+\.\w+
/
gm

Description

Handles email address domains with hyphens and multiple levels.

Credit: 0x90 and Hieu https://stackoverflow.com/questions/17681670/extract-email-sub-strings-from-large-document

Submitted by anonymous - 5 years ago