Regular Expressions 101

Library entries

UK Postcode Validation

Vote

-1

Regular Expression
javascript

/
\b(GIR ?0AA|(?:[A-PR-UWYZ](?:\d{0,2}|[A-HK-Y]\d|[A-HK-Y]\d\d|\d[A-HJKSTUW]|[A-HK-Y]\d[ABEHMNPRV-Y])) ?\d[ABD-HJLNP-UW-Z]{2})\b
/
gmi

Description

Loading markdown...
Submitted by Ti Marner - 7 years ago