RegularRegExpressionsEx101
Show Sidebar
Library entries
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
EN_US
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
ES_ES
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
FR_FR
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
FR_CH
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 9 hours ago
Ex1
no description available
1
1 upvotes, 0 downvotes (100% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 10 hours ago
UNIMARC embedded to standard subfield
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
golang
Submitted by anonymous - a day ago
issue lookbehind
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 days ago
rm everything btwn delimiters
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 2 days ago
fail2ban-php404
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 2 days ago
^[A-Z][a-z0-9_-]*( +[A-Z][a-z0-9_-]*)*$
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 3 days ago
AutoitParser Include
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 4 days ago
analytics config one line
no description available
1
1 upvotes, 0 downvotes (100% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 4 days ago
Asterisk Channel
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 4 days ago
GB_hw22
Image file detection (jpg or jpeg) at the link
Library Entry
Close
The Ultmate Email validation regex
pcre
/
^ (?&address) $ (?(DEFINE) (?<obs_FWS> (?&WSP)++ (?: (?&CRLF) (?&WSP)++)* ) (?<obs_NO_WS_CTL> [\x{01}-\x{08}\x{0B}\x{0C}\x{0E}-\x{1F}\x{7F}] ) (?<obs_angle_addr> (?&CFWS)? < (?&obs_route)? (?&addr_spec) > (?&CFWS)? ) (?<obs_domain> (?&atom) (?: \. (?&atom) )* ) (?<obs_domain_list> @ (?&domain) (?: (?: (?&CFWS) | , )* (?&CFWS)? @ (?&domain) )* ) (?<obs_dtext> (?&obs_NO_WS_CTL) | (?&quoted_pair) ) (?<obs_local_part> (?&word) (?: \. (?&word) )* ) (?<obs_mbox_list> (?: (?&mailbox)? (?&CFWS)? , (?&CFWS) )++ (?&mailbox)? ) (?<obs_phrase> (?&word) (?: (?&word) | \. | (?&CFWS) )* ) (?<obs_qp> \\ (?: \x{00} | (?&obs_NO_WS_CTL) | (?&LF) | (?&CR) ) ) (?<obs_route> (?&CFWS)? (?&obs_domain_list) : (?&CFWS)? ) (?<ALPHA> [A-Za-z] ) (?<CFWS> (?: (?&FWS)? (?&comment) )? ( (?: (?&FWS)? (?&comment) ) | (?&FWS) ) ) (?<CR> \x{0D}) (?<CRLF> \x{0D}\x{0A} ) (?<DIGIT> [0-9] ) (?<DQUOTE> " ) (?<FWS> ( (?&WSP)* (?&CRLF))? (?&WSP)+ | (?&obs_FWS)) (?<LF> \x{0A}) (?<NO_WS_CTL> [\x{01}-\x{08}\x{0B}\x{0C}\x{0E}-\x{1F}\x{7F}] ) (?<VCHAR> [\x{21}-\x{7E}] ) (?<WSP> [\ \t] ) (?<addr_spec> (?&local_part) @ (?&domain) ) (?<address> (?&mailbox_list) | (?&group) ) (?<alt_address> (?&FWS) < (?&addr_spec) > ) (?<angle_addr> (?&CFWS)? < (?&utf8_addr_spec) (?&alt_address)? > (?&CFWS)? | (?&obs_angle_addr) ) (?<atext> (?&ALPHA) | (?&DIGIT) | [!\#$%&'*+\-\/=?^_`{|}~] ) (?<atom> (?&CFWS)? (?&atext)++ (?&CFWS)? ) (?<comment> \( ( (?&FWS)? (?&utf8_ccontent) )*+ (?&FWS)? \) ) (?<ctext> (?&NO_WS_CTL) | [!-'*-\[\]-~] | (?&UTF8_extra_char) ) (?<dcontent> (?&dtext) | (?&quoted_pair) ) (?<display_name> (?&phrase) ) (?<domain> (?&dot_atom) | (?&domain_literal) | (?&obs_domain) ) (?<domain_literal> (?&CFWS)? \[ ( (?&FWS)? (?&dcontent) )*+ (?&FWS)? \] (?&CFWS)? ) (?<dot_atom> (?&CFWS)? (?&dot_atom_text) (?&CFWS)? ) (?<dot_atom_text> (?&atext)++ ( \. (?&atext)++ )* ) (?<dtext> (?&NO_WS_CTL) | [!-Z^-~] | (?&obs_dtext) ) (?<group> (?&display_name) : (?: (?&mailbox_list) | (?&CFWS) ) ; (?&CFWS) ) (?<local_part> (?&dot_atom) | (?&quoted_string) | (?&obs_local_part) ) (?<mailbox> (?&name_addr) | (?&addr_spec) | (?&utf8_addr_spec) ) (?<mailbox_list> (?&mailbox) (?: , (?&mailbox) )*+ | (?&obs_mbox_list) ) (?<name_addr> (?&display_name)? (?&angle_addr) ) (?<phrase> (?&word)++ | (?&obs_phrase) ) (?<qcontent> (?&qtext) | (?&quoted_pair) | (?&utf8_qcontent) ) (?<qtext> (?&NO_WS_CTL) | [!\#-\[\]-~] ) (?<quoted_pair> \\ (?: (?&VCHAR) | (?&WSP) ) | (?&obs_qp) ) (?<quoted_string> (?&CFWS)? (?&DQUOTE) ( (?&FWS)? (?&qcontent) )*+ (?&FWS)? (?&DQUOTE) (?&CFWS)? ) (?<text> [\x{01}-\x{09}\x{0B}\x{0C}\x{0E}-\x{7F}] ) (?<word> (?&atom) | (?&quoted_string) | (?&utf8_atom) | (?&utf8_quoted_string) ) (?<UTF8_2> [\x{C2}-\x{DF}] (?&UTF8_tail) ) (?<UTF8_3> \x{E0} [\x{A0}-\x{BF}] (?&UTF8_tail) | [\x{E1}-\x{EC}] (?&UTF8_tail){2} | \x{ED} [\x{80}-\x{9F}] (?&UTF8_tail) | [\x{EE}\x{EF}] (?&UTF8_tail){2} ) (?<UTF8_4> \x{F0} [\x{90}-\x{BF}] (?&UTF8_tail){2} | [\x{F1}-\x{F3}] (?&UTF8_tail){3} | \x{F4} [\x{80}-\x{8F}] (?&UTF8_tail){2} ) (?<UTF8_extra_char> (?&UTF8_2) | (?&UTF8_3) | (?&UTF8_4) ) (?<UTF8_tail> [\x{80}-\x{BF}] ) (?<utf8_addr_spec> (?&utf8_local_part) @ (?&utf8_domain) ) (?<utf8_atext> (?&ALPHA) | (?&DIGIT) | [!\#$%&'*+\-\/=?^_`{|}~] | (?&UTF8_extra_char) ) (?<utf8_qtext> (?&qtext) | (?&UTF8_extra_char) ) (?<utf8_text> [\x{01}-\x{09}\x{0B}\x{0C}\x{0E}-\x{7F}] | (?&UTF8_extra_char) ) (?<utf8_quoted_pair> \\ (?&utf8_text) | (?&obs_qp) ) (?<utf8_ccontent> (?&ctext) | (?&quoted_pair) | (?&utf8_quoted_pair) | (?&comment) ) (?<utf8_atom> (?&CFWS)? (?&utf8_atext)++ (?&CFWS)? ) (?<utf8_domain> (?&utf8_dot_atom) | (?&domain_literal) | (?&obs_domain) ) (?<utf8_dot_atom> (?&CFWS)? (?&utf8_dot_atom_text) (?&CFWS)? ) (?<utf8_dot_atom_text> (?&utf8_atext)++ ( \. (?&utf8_atext)++ )* ) (?<utf8_local_part> (?&utf8_dot_atom) | (?&utf8_quoted_string) | (?&obs_local_part) ) (?<utf8_qcontent> (?&utf8_qtext) | (?&utf8_quoted_pair) ) (?<utf8_quoted_string> (?&CFWS)? (?&DQUOTE) ( (?&FWS)? (?&utf8_qcontent) )*+ (?&FWS)? (?&DQUOTE) (?&CFWS)? ) )
/
x
Description

This regex validates an email against RFC 5322 with RFC 6530 merged in. This allows for checking for International email addresses. Note that this regex works on bytes so any Unicode characters will have to be encoded in UTF-8 before they will pass.

Submitted by anonymous - 6 months ago
Discussion