Regular Expressions 101

Community Patterns

Strip Email ID from Name


Regular Expression
PCRE (PHP <7.3)


Use this regex to select all characters up to the "<" bracket. Then, reverse the direction of the bracket to select the closing ">" bracket. It works across multiple lines. You can get an email list with only the IDs. This is the pattern it matches:

Alpha Person

Step 1 (.) [$<$] gives you> Step 2 [$.$] (.) gives you

Submitted by Jonathan Davidar - 10 years ago