Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^(N[BLSTU]|[AMN]B|[BQ]C|ON|PE|SK)$
|
Description |
Matches Canadian provincial codes. Similar to the one already posted but smaller, faster, and will correctly return the results in one match group rather than using several so it's much friendlier.
|
Matches |
ON | PE | NB
|
Non-Matches |
OB | NM
|
Author |
Rating:
Matthew Hartman
|
Title |
Test
Details
Canadian postal code
|
Expression |
\b(?([A-Z])[^DFIOQUWZ])\d(?([A-Z])[^DFIOQU])\d(?([A-Z])[^DFIOQUWZ])\d\b
|
Description |
Matches Canadian postal codes from http://en.wikipedia.org/wiki/Canadian_postal_code. Originally I was going to use http://regexlib.com/REDetails.aspx?regexp_id=1676 but C# did not like it. I rewrote it to this version which works correctly.
|
Matches |
K7P3K6
|
Non-Matches |
W7P3K6
|
Author |
Rating:
Not yet rated.
Matthew Hartman
|
Displaying page
of
pages;
Items to