<p>I need to be able to validate a string against a list of the possible United States Postal Service state abbreviations, and Google is not offering me any direction. </p>

<p>I know of the obvious solution: and that is to code a horridly huge if (or switch) statement to check and compare against all 50 states, but I am asking StackOverflow, since there has to be an easier way of doing this. Is there any RegEx or an enumerator object out there that I could use to quickly do this the most efficient way possible?</p>

<p>[C# and .net 3.5 by the way]</p>

<p><a href="https://www.usps.com/send/official-abbreviations.htm" rel="noreferrer">List of USPS State Abbreviations</a></p>

Here's a regex.  Enjoy!
```
```
^(?-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])$
```
```