Regular Expressions 101

Community Patterns

match name and surname in a name.surname@domain.com email.

0

Regular Expression
Java 8

"
[^\W\d_]+(?=.*@)
"
g

Description

This will match any words that show up before the @ sign in an email. Digits, dots, commasz and other special characters are ignored.

Submitted by WojciechW - a year ago