Regular Expressions 101

Community Patterns

simple split for email address

1

Regular Expression
ECMAScript (JavaScript)

/
(\S[^\.]*)(\.(\S*))?@(\S*)
/
ig

Description

Simple match for parts of an email address to get firstname, lastname and email domain. (Does not include validity check!)

Submitted by art-ist.cc - 8 years ago