I\'m using this validator:
//validate postcode function IsPostcode($postcode) { $postcode = strtoupper(str_replace(\' \',\'\',$postcode)); if(preg_match(
you can use my updated regex to solve you problem
it working from my end to validate UK zip code
OUTPUT
1
Hope this will sure help you.