Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^[a-zA-Z0-9]+([\-]?)+([\._]?[a-zA-Z0-9\-])+([\._]?)*([a-zA-Z0-9])@[a-zA-Z0-9\-]([\._]?[a-zA-Z0-9\-])*(\.\w{2,3})+$
/

Description

Case error when use a email address not valid.

When use next character is:

  1. / ! “ # $ % & ‘ ( ) = ~ | \ ^ : ; * + ? < > , ` [ ] { }
  2. Case use character out of Alphabet english.
  3. Use [.(dot) or __(underscore)] twice times.
  4. First character or character before @ is special character.
Submitted by dinh_sinh - 8 years ago