2012-11-11

← Older revision

Revision as of 16:06, 11 November 2012

Line 1:

Line 1:



;Note: These
Regex
are examples and not
build
for
an
particular Regex engine. However, the PCRE syntax is mainly used. In particular this means that character classes do not contain meta characters which need to be escaped,
excpet
the - and ] character, where it is assumed that a - needs not to be escaped only when it is the last character in a character class. The character class supports shortcut notations for other character classes like \s or \w which should not be used as they depend on the LOCALE environment setting in most systems.

+

;Note: These
Regexs
are examples and not
built
for
a
particular Regex engine. However, the PCRE syntax is mainly used. In particular
,
this means that character classes do not contain meta characters which need to be escaped,
except
the - and ] character, where it is assumed that a - needs not to be escaped only when it is the last character in a character class. The character class supports shortcut notations for other character classes like \s or \w which should not be used as they depend on the LOCALE environment setting in most systems.



PLease
carefully test the
regenx
in your regex engine.

+

+

Please
carefully test the
regex
in your regex engine.

Line 7:

Line 8:

url

url



+

A valid URL per the URL spec.

Line 13:

Line 14:

IP

IP



+

A valid IP Address

Line 19:

Line 20:

e-mail

e-mail



+

A valid e-mail address

Line 37:

Line 38:

creditcard

creditcard



+

A valid credit card number

Line 55:

Line 56:

English_daywords

English_daywords



English
23
character abbreviations for the days of the week

+

English
2
character abbreviations for the days of the week

Line 67:

Line 68:

French_digitwords

French_digitwords



The
Frensh
words representing the digits 0 to 9

+

The
French
words representing the digits 0 to 9

Line 97:

Line 98:

US_state

US_state



Two
letter state abbreviations

+

2
letter
U.S.
state abbreviations

Line 103:

Line 104:

US_ssn

US_ssn



9 digit social security number with dashes

+

9 digit
U.S.
social security number with dashes

Line 127:

Line 128:

'''Regex Library Site'''

'''Regex Library Site'''



[
http://regexlib.com/
http://regexlib.com/]
: A site that has a HUGE library of regular expressions and other regex resources

+

http://regexlib.com/:

A site that has a HUGE library of regular expressions and other regex resources

+

+

'''Regex Tutorial Site'''

+

+

http://www.regular-expressions.info/:  A site with lots of tutorials on writing Regexs and numerous examples

'''Regex Construction Tool'''

'''Regex Construction Tool'''



[
http://www.ultrapico.com/Expresso.htm http://
www
.
ultrapico
.
com
/
Expresso
.
htm]
:
A free
regex
construction tool

+

http://www.ultrapico.com/Expresso.htm
:  A free regex construction tool

+

+

'''Regex Explanation Tool'''

+

+

http://
rick
.
measham
.
id.au
/
paste/explain
.
pl?regex=.*
:
Explains in English what the supplied
regex
means

[[Category:OWASP Validation Project]]

[[Category:OWASP Validation Project]]

[[Category:OWASP Application Security Verification Standard Project]]

[[Category:OWASP Application Security Verification Standard Project]]

[[Category:How To]]

[[Category:How To]]

Show more