173 regular expressions found in this category!
Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^[A-Z]{2}[0-9]{6}[A-DFM]{1}$ |
Description |
UK National Insurance Number (NINO) validation. (The following modifications have been made: Only A to D are permitted as the last letter, and all letters should be in uppercase. For temporary numbers F and M are permitted for female and male holders.) |
Matches |
AB123456D | AB123456F | AB123456M |
Non-Matches |
AB123456E | ab123456d |
Author |
Rating:
Not yet rated.
Peter Whyte
|
Title |
Test
Details
Pattern Title
|
Expression |
^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$ |
Description |
GUID Tester.
This is a modification from the regular expression submitted by James Bray ( [email protected]). It allows the use of mixed upper and lowercase letters in the GUID string. |
Matches |
BFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA | BFDB4d31-3e35-4dab-afca-5e6e5c8f61ea |
Non-Matches |
qqqBFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA | BFDB4D31-3E-4DAB-AFCA-5E6E5C8F61EA | BFDB4D31-3E35-4DAB-AF |
Author |
Rating:
Not yet rated.
V. Lorz
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([a-z])+.)+[A-Z]([a-z])+$ |
Description |
This matches Java class names such as "com.test.Test". It's being used within an XML Schema to validate classname as specified in XML documents. |
Matches |
com.test.Test | com.Test |
Non-Matches |
com.test.test | com.test.TEst | Com.test.Test |
Author |
Rating:
Not yet rated.
Matt Biggin
|
Title |
Test
Details
Roman numerials
|
Expression |
^(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?XX{0,2})|L)?((I[VX])|(V?(II{0,2}))|V)?))$ |
Description |
This RE validates alpha characters that evaluate to Roman numerials, ranging from 1(I) - 3999(MMMCMXCIX). Not case sensitive. |
Matches |
III | xiv | MCMXCIX |
Non-Matches |
iiV | MCCM | XXXX |
Author |
Rating:
Not yet rated.
Michael Ash
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([+]\d{2}[ ][1-9]\d{0,2}[ ])|([0]\d{1,3}[-]))((\d{2}([ ]\d{2}){2})|(\d{3}([ ]\d{3})*([ ]\d{2})+))$ |
Description |
Swedish phone numbers according to SIS standard |
Matches |
+46 8 123 456 78 | 08-123 456 78 | 0123-456 78 |
Non-Matches |
+46 08-123 456 78 | 08 123 456 78 | 0123 456 78 |
Author |
Rating:
Not yet rated.
Martin Henningsson
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{2}(\x2e)(\d{3})(-\d{3})?$ |
Description |
Other expression to standard 5 digit Brazilian Postal Codes (CEP), or the CEP + 3 digits (distribution identifiers - suffix).
The diference of the original one, is that the "." is mandatory. |
Matches |
12.345-678 | 23.345-123 | 99.999 |
Non-Matches |
41222-222 | 3.444-233 | 43.324444 |
Author |
Rating:
Not yet rated.
Rafael Miranda
|
Title |
Test
Details
Pattern Title
|
Expression |
(NOT)?(\s*\(*)\s*(\w+)\s*(=|<>|<|>|LIKE|IN)\s*(\(([^\)]*)\)|'([^']*)'|(-?\d*\.?\d+))(\s*\)*\s*)(AND|OR)? |
Description |
Heres my sql clause parser regexp for recordset filtering. Does recursive query parsing all by its self. Only problem I cant figure is how to match comma separated lists of quoted strings. Tell me if you figure out how!
The unicodes in the re was put in by the entry form please replace them with their ascii equivalents to use it. |
Matches |
Aeroplane LIKE 767 | Movie LIKE 'Star' AND NOT Movie LIKE 'Trek' | Number IN (1,2,3,4,5) |
Non-Matches |
Hello there | A=EXCELLENT OR | B!=POOR |
Author |
Rating:
Not yet rated.
Joseph Warwick
|
Title |
Test
Details
Pattern Title
|
Expression |
(.*\.([wW][mM][aA])|([mM][pP][3])$) |
Description |
Matches a file name to be either a .wma or .mp3 file. This can be used to check file uploads to make sure they are of a certain type. Substitute letters where appropriate for specific file types. To include more simply add logical 'or' (|) operator and append. |
Matches |
|
Non-Matches |
whatever.exe | somethingelse.mpa | thisagain.wm3 |
Author |
Rating:
Not yet rated.
Pete Samwel
|
Title |
Test
Details
Pattern Title
|
Expression |
[1-2][0|9][0-9]{2}[0-1][0-9][0-3][0-9][-][0-9]{4} |
Description |
Swedish person number. Don't work on persons older then 100 years, but they are so few that it shouldn't be a problem. Easy to fix, but I choose not to accept oldies... |
Matches |
19740609-7845 | 19811116-7845 | 20010913-7598 |
Non-Matches |
21003612-9999 | 18790505-4545 | 19740641-5559 |
Author |
Rating:
Not yet rated.
Tomas Axelsson
|
Title |
Test
Details
AMD Athlon/Duron Codes (not Athlon 64)
|
Expression |
^((A(((H[MX])|(M(P|SN))|(X((D[ACH])|(M[DS]))?)))?)|(K7(A)?)|(D(H[DLM])?))(\d{3,4})[ABD-G][CHJK-NPQT-Y][Q-TV][1-4][B-E]$ |
Description |
Matches valid reference codes for AMD Athlon and Duron processors (not Athlon 64). |
Matches |
AXDA3200DKV4E | A1000AMT3B | D800AUT1B |
Non-Matches |
N/A |
Author |
Rating:
Not yet rated.
Amos Hurd
|
Title |
Test
Details
Pattern Title
|
Expression |
^(.|\n){0,16}$ |
Description |
Limit Length - limit the length of a text box or other area to contain any character plus new line |
Matches |
shorter than max |
Non-Matches |
string longer than max |
Author |
Rating:
Not yet rated.
David Yack
|
Title |
Test
Details
Pattern Title
|
Expression |
^((4\d{3})|(5[1-5]\d{2}))(-?|\040?)(\d{4}(-?|\040?)){3}|^(3[4,7]\d{2})(-?|\040?)\d{6}(-?|\040?)\d{5} |
Description |
Credit card validator for AMEX, VISA, MasterCard only. Allows spaces, dashes, or no separator between digit groups according to the layout (4-6-5 for AMEX, 4-4-4-4 for Visa and Mastercard) |
Matches |
3711-078176-01234 | 4123 5123 6123 7123 | 5123412361237123 |
Non-Matches |
3711-4123-5123-6112 |
Author |
Rating:
Not yet rated.
Rick Spiewak
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}(-\d{3})?$ |
Description |
Matches standard 5 digit Brazilian Postal Codes (CEP), or the CEP + 3 digits (distribution identifiers - suffix).
For more info refer to: http://www.correios.com.br/servicos/cep/Estrutura_CEP.cfm (in portuguese). |
Matches |
13165-000 | 38175-000 | 81470-276 |
Non-Matches |
13165-00 | 38175-abc | 81470-2763 |
Author |
Rating:
Not yet rated.
Carlos Nascimento
|
Title |
Test
Details
Pattern Title
|
Expression |
^[AaWaKkNn][a-zA-Z]?[0-9][a-zA-Z]{1,3}$ |
Description |
Simple match for U.S. Amateur Radio Call signs
Must start with an A,K,N or W.
1 or two prefix letters (not case sensitive),
Exactly one zone digit,
One to three suffix digits( not case sensitive).
73
|
Matches |
kd6dun | W9OXZ | kb8ae |
Non-Matches |
kdd90bz | de7bgw | WV7BXQ5 |
Author |
Rating:
Not yet rated.
David Tersigni
|
Title |
Test
Details
Pattern Title
|
Expression |
^[\u0081-\uFFFF]{1,}$ |
Description |
Double byte charactors validator.
The rule applies to double byte charactor input validation. |
Matches |
??? | ???? |
Non-Matches |
ABC | ;&#F; |
Author |
Rating:
Not yet rated.
Max Lu
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$ |
Description |
Checks for a valid windows file name (Must be used with the case-insensitive option
Checks that the file has at lease one char, does not contain any invalid characters and does not have a reserved word as a file name.
"If you see a &quot; in the regex replace it with a " character" |
Matches |
test.txt | test.jpg.txt | a&b c.bmp |
Non-Matches |
CON | .pdf | test:2.pdf |
Author |
Rating:
Not yet rated.
Andre Van Der Merwe
|
Title |
Test
Details
Pattern Title
|
Expression |
^[^#]([^ ]+ ){6}[^ ]+$ |
Description |
We've come across the situation where we had to extract the IIS-Log entries without the header information. The data is far more complex than the sample given.
Explanation:
^[^#] = lines not beginnin with #
([^ ]+ ){6} = 6 times no space until one space
[^ ]+ = no spaces allowed...
$ = ...until end of line
For further explanation don't hesitate to write E-Mail. |
Matches |
1111 2222 33 44444 55 6 7777 |
Non-Matches |
#IIS Logfile header |
Author |
Rating:
Not yet rated.
Volker Roth
|
Title |
Test
Details
Pattern Title
|
Expression |
^\s*(((\d*\.?\d*[0-9]+\d*)|([0-9]+\d*\.\d*) )\s*[xX]\s*){2}((\d*\.?\d*[0-9]+\d*)|([0-9]+\d*\.\d*))\s*$ |
Description |
This validates Length times Width times Height measurements, which consists of 3 whole or decimal numbers separated by an x. |
Matches |
1.1 x 4.35 x 5.0 | 1 x 2 x 3 | 4.75 x 300.25 x 0 |
Non-Matches |
z.56 x 6 x 7 | 1 xx 2 x 3 | 1 by 2 by 3 |
Author |
Rating:
Not yet rated.
Rod Early
|
Displaying page
of
pages;
Items to