Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-05-29 06:42
Flavor·PCRE2 (PHP)

/
^[A-z0-9]+@[a-z]+\.[a-z]+$
/
gm
Open regex in editor

Description

Writes a regular expression that performs simple email validation An email consists of: username @ domain name Usernames are alphanumeric Domain names consist of two strings, separated by a period Domain names may contain only English letters

^ means that the pattern should start at the beginning of the row $ means that the pattern should end at the end of the row

Submitted by anonymous