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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 16
Title Test Details PA, OH, new MI License Plates
Expression
^[A-Z]{3}(\s)?[0-9]{4}$
Description
Pattern for Pennsylvania, Ohio, and Michigan (new) regular license plates
Matches
NVX 5621; PRJ 4990
Non-Matches
ABC 123; 5399 XQA
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Medicare ID#
Expression
^((\d){3})(-)?(\d){2}(-)?(\d){4}(A|B[1-7]?|M|T|C[1-4]|D)$
Description
An individual's (soon to be) Medicare number in the USA is a social security number (whether it be the individual's, spouse's, or parent) plus a series of 1 or 2 digit characters at the end.
Matches
315-77-8771A 002-51-3788B2
Non-Matches
215-77-8866 002-18-3399E
Author Rating: Not yet rated. Mickael Caruso
Title Test Details French Last Names, Part I
Expression
^[A-Z][a-z]+((i)?e(a)?(u)?[r(re)?|x]?)$
Description
You can tell whether a last name is French or not. How do you teach your programs to recognize French last names? Here's an attempt. We haven't really covered other French names like LaMarre or François yet. Those will be in future French-regonition regular expressions.
Matches
Trudeau, Lemieux, Pelletier, Coderre, Bordeaux, LaFleur, Adieu, Dedonder
Non-Matches
Craveiro, Sbardelli, Baciu
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Blue Cross Blue Shield Member ID
Expression
^[A-Z]{3}(\d|[A-Z]){8,12}$
Description
For all of you who have Blue Cross Blue Shield insurance coverage (not Federal, though)- check out your insurance cards! It ALWAYS begins with 3 letters (called the alpha prefix) and a series of alpha-numeric characters ranging from 8 to 12 digits.
Matches
XOF800108019 MRT10829939W WHWXZA130299
Non-Matches
XQM100X 129-22-5898 R12345678
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Blue Cross Blue Shield Federal ID#
Expression
^R(\d){8}
Description
For those who work in the government somewhere who have BCBS coverage, this is your regular expression.
Matches
R12345678 R85731119
Non-Matches
R0000111 ABC123
Author Rating: Not yet rated. Mickael Caruso
Title Test Details French Last Names, Part II
Expression
^[A-Z][a-z]+(o(i|u)(n|(v)?r(t)?|s|t|x)(e(s)?)?)$
Description
Part II of French last names. Like part 1, it doesn't cover all French names.
Matches
François, Benoit, LaCroix, Des Moines, Chaudoir, Boire, Betencourt
Non-Matches
Gagnon, Lefebvre, Legendre, Flores
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Musical Chords
Expression
^[A-G](b|#)?((m(aj)?|M|aug|dim|sus)([2-7]|9|13)?)?(\/[A-G](b|#)?)?$
Description
Play guitar or read sheet music for piano/keyboard? You've got to be familiar with chord notations. They've got to have some format that regular expressions can test.
Matches
F#maj7 B Abaug7 C#m6/A#
Non-Matches
Amajb B#sus10 Gbm/D#6
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Armenian Last Name
Expression
~[A-Z][a-z]+(b|ch|d|g|j|k|l|m|n|p|r|s|t|v|z)(ian)$
Description
From experience and what I've been told, last names ending in -ian are most likely of Armenian origin. There could be some other foreign names that pass this pattern. Also, not every Armenian has a last name that ends in -ian. -ian is just common enough to stereotype.
Matches
Topalian, Minasian, Hagopian, Khachaturian, Marderosian
Non-Matches
Mendeleav, Centurion, Miriam
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Dutch Last Names
Expression
^[A-Z][a-z]+((e(m|ng)|str)a)$
Description
How do you tell whether a last name is of Dutch origin? This pattern captures the -enga's, -stra's, and -ema's. There are also other Dutch names that don't end with these three "suffixes" but you know it's Dutch if it ends with either of those three.
Matches
Wiersema, Huizenga, Dykstra, Drolema, Hamstra
Non-Matches
Bistro, Hamstring, Anselmi, Manga
Author Rating: Not yet rated. Mickael Caruso
Title Test Details College Course Numbers (USA)
Expression
^[A-Z]{4}[1-8](\d){2}$
Description
College course numbers are usually in the format LLLLNNN where L is a letter and N is a numeric digit, where the first digit ranges from 1-8 inclusive. 1-4 is undergrad, and 5-8 is masters and above.
Matches
CPTR451 ENGL101 MATH173
Non-Matches
GRMN099 ENGR48 ENG1100
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Portuguese Last Names
Expression
^[A-Z][a-z]+((eir|(n|l)h)(a|o))$
Description
I noticed that a last name is Portuguese if it ends in -eira, -eiro, -nha, or -nho. I know there are other Portuguese names that don't end with these, but I haven't yet come across any other foreign last names (besides Portuguese/Brazilian) that end in those 4.
Matches
Coelho Cunha Pereira Texeira Carreiro
Non-Matches
Ferrero Bandera Singh Bacalao
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Scientific Notation
Expression
^(\d)(\.)(\d)+\s(x)\s(10)(e|E|\^)(-)?(\d)+$
Description
Scientific notation from school as best as we can put it on textboxes/textareas.
Matches
2.99 x 10^33; 3.14159 x 10E5
Non-Matches
33.2 x 10^7; 0.180 X 10^6.3
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Flight Number
Expression
^([A-Z]{2}|[A-Z]\d|\d[A-Z])[1-9](\d{1,3})?$
Description
Flight numbers have two parts: The first 2 characters denote the airline's two-letter code. This airline code MUST be either letter-letter, number-letter, or letter-number, NEVER number-number. The 3rd digit has to be a numeric digit from 1 to 9 inclusive. After this 3rd digit, we may append any integer from 0 to 999.
Matches
NW1451 9M116 RG8
Non-Matches
N1265 BZ003
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Jewish Last Names
Expression
^[A-Z][a-z]+(tz)?(man|berg)$
Description
Legend has it that if a last name ends in -man or -berg, the person who has that last name is Jewish. Of course there are Jewish people whose names don't follow the pattern, and there could be those whose last names end in -man or -berg who are not Jewish (or are they and they don't just know it?).
Matches
Feldman, Portman, Krentzman, Silberman, Goldberg
Non-Matches
Schumann, Damon, Pittsburgh, Landenberger
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Classical Music Work Cataloguing System
Expression
^(Op(.|us))(\s)[1-9](\d)*((,)?(\s)N(o.|um(.|ber))\s[1-9](\d)*)?$
Description
This is how a composer catalogued his or her musical works in classical music, except for Bach (who used BWV) and Mozart (who used K.). There may have been others. However, most other composers used the format Opus x, Number y. Sometimes, it's just Opus x if it's a big work like a concerto or a symphony.
Matches
Op. 3 No. 2; Op. 10, No. 6
Non-Matches
Opus 4 Num. 5; Opu. 9 Numb. 99
Author Rating: Not yet rated. Mickael Caruso
Title Test Details Bra Size
Expression
^[2-5](2|4|6|8|0)(A(A)?|B|C|D(D(D)?)?|E|F|G|H)$
Description
Yes, bra sizes can also be tested by regular expressions. The numeric digits represent the rib cage circumference, measured under the breast excluding the breast. It MUST be an even number. The letters determine the cup size - AA is the smallest, H (and beyond, which this regular expression does not represent) is the largest. In summary, the cup sizes are determined by the "full chest circumference" (which includes the breast) MINUS the rib cage circumference. Smaller differences are closer to A and larger differences are closest to DDD or F
Matches
32A 36C 46DD
Non-Matches
33B 20Q 12AAA
Author Rating: Not yet rated. Mickael Caruso
   Displaying page 1 of 1 pages; Items 1 to 16

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