Created
March 9, 2012 20:17
-
-
Save PhazeonPhoenix/2008449 to your computer and use it in GitHub Desktop.
RegEx: State Abbreviations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://regexlib.com/REDetails.aspx?regexp_id=471 | |
# Match U.S. state abbreviation used by the U.S. Post Office. | |
^(?-i:A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment