Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
\b(?<!\.)[!#$%&'*+\-/=?^_`{|}~\w][!#$%&'*+\-/=?^_`{|}~\.\w]{0,}[!#$%&'*+\-/=?^_`{|}~\w][@]\w+(?:[-.]\w+)*
"
gmi

Description

It won't recognize if the local-part is just one character like t@somedomain.com

Submitted by anonymous - 3 years ago