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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(^N[BLSTU]$)|(^[AMN]B$)|(^[BQ]C$)|(^ON$)|(^PE$)|(^SK$)$
Description
used to match standard province codes in upper case.
Matches
ON
Non-Matches
ONT
Author Rating: The rating for this expression. Stewart Waldron
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: YT not accepted
Name: Jim
Date: 4/21/2007 3:01:17 PM
Comment:
The symbol for the Yukon Territory (YT) is not accepted. I have added |(^YT$) after the check for SK. Here's the complete regex: ^(^N[BLSTU]$)|(^[AMN]B$)|(^[BQ]C$)|(^ON$)|(^PE$)|(^SK$)|(^YT$)$


Title: Programmer Analyst
Name: Matthew Hartman
Date: 11/8/2005 11:02:35 AM
Comment:
This RegExp is awsome. I like it alot better then the one I've been using which I wrote myself.


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