Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-07-21 20:03
Flavor·PCRE (Legacy)

/
^(?<User>[_a-z0-9-]+(\.[_a-z0-9-]+(?<GmailTag>\+[_-a-z0-9]+){0,1})*)@(?<Host>[a-z0-9-]+(\.[a-z0-9-]+)*\.[a-z]{2,4})$
/
i
Open regex in editor

Description

Get Gmail tag, user and domain of an email address.

-- Fixed the bug that the label be obligatory

Submitted by Matías Pizarro González