Friday, August 21, 2009
UK Postcode Validation - Regular Expression (Regex)
UK Postcode - Regular Expression:
UK Postcode - Regular Expression General Pattern (Without Space):
UK Postcode - Regular Expression General Pattern (With Space):
UK Postcode - Regular Expression - Pattern1:
UK Postcode - Regular Expression - Pattern2:
The above regex's are for valid uk postcode; you may have to use any/all of the patterns depending on your requirement
UK Postcode - Regular Expression General Pattern (Without Space):
/^[a-zA-Z0-9]{3,9}$/
UK Postcode - Regular Expression General Pattern (With Space):
/^[a-zA-Z0-9 ]{3,9}$/
UK Postcode - Regular Expression - Pattern1:
/^[a-zA-Z][a-zA-Z0-9][0-9]{3}$/
UK Postcode - Regular Expression - Pattern2:
/^[a-zA-Z][a-zA-Z0-9][0-9][0-9]{4}$/
The above regex's are for valid uk postcode; you may have to use any/all of the patterns depending on your requirement
Subscribe to:
Post Comments
(
Atom
)
1 comment :
Earning money online never been this easy and transparent. You would find great tips on how to make that dream amount every month. So go ahead and click here for more details and open floodgates to your online income. All the best
Post a Comment