Skip to content

Instantly share code, notes, and snippets.

@younjin
Forked from psobot/ontarioPostalCode.php
Last active December 20, 2015 06:29
Show Gist options
  • Save younjin/6086583 to your computer and use it in GitHub Desktop.
Save younjin/6086583 to your computer and use it in GitHub Desktop.
ftfy
<?php
function isOntarioPostalCode($string){
return preg_match("%[PKLNM][123456789][ABCEGHJKLMNPRSTVWXYZ]( )?\d[ABCEGHJKLMNPRSTVWXYZ][123456789]%i"), $string);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment