Development Desk

Just another WordPress.com site

Monthly Archives: August 2012

Regular Expression to check Valid UK Postcode for Upper and Lower case

It is Regular Expression to check valid post code for UK for both Upper and Lowecase

^((?i)([A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]| [ABEHMNPRV-Y]))|[0-9][A-HJKS-UW]))\ ?[0-9][ABD-HJLNP-UW-Z]{2}|

(GIR\ 0AA)|(SAN\ TA1)|(BFPO\ (C\/O\)?[0-9]{1,4})|((ASCN|BBND|[BFS]IQQ|PCRN|STHL|TDCU|TKCA)\ 1ZZ))$

 

Thanks

Advertisements