Wednesday, August 11, 2010 1:29:00 PM
Rate this Content
0
0 Votes
I was looking for a RegEx Expression that validates all US States in both upper and lowercase. I was only able to find ones that validated uppercase, so I created one for lowercase as well. Enjoy
^(?:A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR] |PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY]|a[klrz]|c[aot]|d[cd]|fl|ga|hi|i[adln] |k[sy]|la|m[adeinost]|n[cdehjmvy]|o[hkr]|pa|ri|s[cd]|t[nx]|ut|v[at]|w[aivy])*$
Copyright (c) Mercatus3, LLC