Regular Expressions 101

Community Patterns

RipNameFromEmail

1

Regular Expression
Python

r"
^\s+|\s*"\s*|\s*<.*|\S+@\S+|\s*\(\s*|\s*\)\s*
"
g

Description

handles quotes, non-quotes, angle bracket, parans, and trips extra white spaces

Submitted by dano - 8 years ago