Regular Expressions 101

Library entries

-171
pcre

gfdgfsdgsfdg

no description available
Submitted by anonymous - 10 years ago
-75
pcre

link

no description available
Submitted by anonymous - 10 years ago
-52
pcre

ddasgfsfds

no description available
Submitted by fs - 10 years ago
-36
pcre

E-mail validation regex

no description available
Submitted by anonymous - 10 years ago
-34
pcre

your mom

aasdf
Submitted by your mom - 9 years ago
-22
pcre

г.москва

no description available
Submitted by anonymous - 9 years ago
-20
javascript

validating email

no description available
Submitted by niyas - 9 years ago
-19
javascript

www.medibank.com.au

no description available
Submitted by anonymous - 8 years ago
-18
pcre

dd-mm-YYYY HH:mm:ss (year range 1000-2999)

no description available
Submitted by Ka. - 10 years ago
-14
javascript

Haha !

no description available
Submitted by Alex - 9 years ago
-10
pcre

need help

no description available
Submitted by sachin - 9 years ago
-10
pcre

test

no description available
Submitted by test - 9 years ago
-10
javascript

<script>alert(1)</script>

alert(1)alert(1)
Submitted by <script>alert(1)</script> - 9 years ago
-8
pcre

Regular exp to exclude a domain

to exclude one domain abc.com
Submitted by Sandy - 10 years ago
-7
javascript

Javascipt variable

Matches a javascript variable
Submitted by Andres Jorquera - 9 years ago
-7
pcre

hi

no description available
Submitted by asf - 9 years ago
-6
javascript

n.o

nao
Submitted by Flávio - 9 years ago

Matching email addresses per RFC5322

Vote

234

Regular Expression
pcre

/
(?(DEFINE) (?<addr_spec> (?&local_part) @ (?&domain) ) (?<local_part> (?&dot_atom) | (?&quoted_string) | (?&obs_local_part) ) (?<domain> (?&dot_atom) | (?&domain_literal) | (?&obs_domain) ) (?<domain_literal> (?&CFWS)? \[ (?: (?&FWS)? (?&dtext) )* (?&FWS)? \] (?&CFWS)? ) (?<dtext> [\x21-\x5a] | [\x5e-\x7e] | (?&obs_dtext) ) (?<quoted_pair> \\ (?: (?&VCHAR) | (?&WSP) ) | (?&obs_qp) ) (?<dot_atom> (?&CFWS)? (?&dot_atom_text) (?&CFWS)? ) (?<dot_atom_text> (?&atext) (?: \. (?&atext) )* ) (?<atext> [a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+ ) (?<atom> (?&CFWS)? (?&atext) (?&CFWS)? ) (?<word> (?&atom) | (?&quoted_string) ) (?<quoted_string> (?&CFWS)? " (?: (?&FWS)? (?&qcontent) )* (?&FWS)? " (?&CFWS)? ) (?<qcontent> (?&qtext) | (?&quoted_pair) ) (?<qtext> \x21 | [\x23-\x5b] | [\x5d-\x7e] | (?&obs_qtext) ) # comments and whitespace (?<FWS> (?: (?&WSP)* \r\n )? (?&WSP)+ | (?&obs_FWS) ) (?<CFWS> (?: (?&FWS)? (?&comment) )+ (?&FWS)? | (?&FWS) ) (?<comment> \( (?: (?&FWS)? (?&ccontent) )* (?&FWS)? \) ) (?<ccontent> (?&ctext) | (?&quoted_pair) | (?&comment) ) (?<ctext> [\x21-\x27] | [\x2a-\x5b] | [\x5d-\x7e] | (?&obs_ctext) ) # obsolete tokens (?<obs_domain> (?&atom) (?: \. (?&atom) )* ) (?<obs_local_part> (?&word) (?: \. (?&word) )* ) (?<obs_dtext> (?&obs_NO_WS_CTL) | (?&quoted_pair) ) (?<obs_qp> \\ (?: \x00 | (?&obs_NO_WS_CTL) | \n | \r ) ) (?<obs_FWS> (?&WSP)+ (?: \r\n (?&WSP)+ )* ) (?<obs_ctext> (?&obs_NO_WS_CTL) ) (?<obs_qtext> (?&obs_NO_WS_CTL) ) (?<obs_NO_WS_CTL> [\x01-\x08] | \x0b | \x0c | [\x0e-\x1f] | \x7f ) # character class definitions (?<VCHAR> [\x21-\x7E] ) (?<WSP> [ \t] ) ) ^(?&addr_spec)$
/
xmg

Description

Loading markdown...
Submitted by Michael Musson - 10 years ago