Regular Expressions 101

Community Patterns

Extract email client inserted "On <DATE>, <SENDER> wrote:"

-2

Regular Expression
PCRE (PHP <7.3)

/
^>(?:.|\s>)*<[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}>(?:.|\s)*?:
/
gm

Description

Email clients add this line, call it "sender wrote" to reply emails.

Submitted by Vlad Burca - 9 years ago