RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find US States and DC
Expression
^((A[LKZR])|(C[AOT])|(D[EC])|(FL)|(GA)|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EDAINSOT])|(N[EVHJMYCD])|(O[HKR])|(PA)|(RI)|(S[CD])|(T[NX])|(UT)|(V[TA])|(W[AVIY]))$
Description
The 50 US states and DC (Disctrict of Columbia).
Matches
AZ NY
Non-Matches
az Az Arizona
Author Rating: The rating for this expression. Mike Hamilton
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Thanks
Name: Mike Hamilton
Date: 4/23/2008 6:41:08 PM
Comment:
Thanks for the comment. I will update the expression. I am still a new regex writer. Thanks for being gentle in the commenting, and not flaming me as the noob I am. LOL


Title: Unneeded commas
Name: Michael Ash
Date: 4/22/2008 11:31:54 AM
Comment:
All the commas in your expression are not needed. They allow for things like "A," to match


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials