173 regular expressions found in this category!
Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^\d{3}\s?\d{3}$ |
Description |
This can be used to match indian style pincodes / postal codes used by the indian postal departments which are 6 digits long and may have space after the 3rd digit |
Matches |
400 099 | 400099 | 400050 |
Non-Matches |
2345678 | 12345 | asdf |
Author |
Rating:
anup kallingal
|
Title |
Test
Details
Pattern Title
|
Expression |
\d{2}.?\d{3}.?\d{3}/?\d{4}-?\d{2} |
Description |
This regular expressions matches CNPJ number. CNPJ is a Registration Number of Brazilian Companies. |
Matches |
00.000.000/0000-00 | 00000000000000 |
Non-Matches |
00-000-000-000-00 | AA.AAA.AAA/AAAA-AA |
Author |
Rating:
Gabriel Fróes
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$ |
Description |
This matches an IP address, putting each number in its own group that can be retrieved by number. If you do not care about capturing the numbers, then you can make this shorter by putting everything after ^ until immediately after the first \. in a group ( ) with a {3} after it. Then put the number matching regex in once more.
It only permits numbers in the range 0-255.
|
Matches |
0.0.0.0 | 255.255.255.02 | 192.168.0.136 |
Non-Matches |
256.1.3.4 | 023.44.33.22 | 10.57.98.23. |
Author |
Rating:
Andrew Polshaw
|
Title |
Test
Details
Pattern Title
|
Expression |
^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$ |
Description |
This RegEx requires a US phone number WITH area code. It is written to all users to enter whatever delimiters they want or no delimiters at all (i.e. 111-222-3333, or 111.222.3333, or (111) 222-3333, or 1112223333, etc...). |
Matches |
(111) 222-3333 | 1112223333 | 111-222-3333 |
Non-Matches |
11122223333 | 11112223333 | 11122233333 |
Author |
Rating:
Laurence O'Donnell
|
Title |
Test
Details
Pattern Title
|
Expression |
(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$) |
Description |
Regular expression to evaluate dutch-style phone numbers. Possible example prefixes: +31, +31(0), (+31)(0), 0, 0031
followed by 9 numbers (which can contain a space or -). |
Matches |
+31235256677 | +31(0)235256677 | 023-5256677 |
Non-Matches |
+3123525667788999 | 3123525667788 | 232-2566778 |
Author |
Rating:
Jon van Leuven
|
Title |
Test
Details
Pattern Title
|
Expression |
^([a-zA-Z0-9@*#]{8,15})$ |
Description |
Password matching expression. Match all alphanumeric character and predefined wild characters. Password must consists of at least 8 characters and not more than 15 characters.
|
Matches |
@12X*567 | 1#Zv96g@*Yfasd4 | #67jhgt@erd |
Non-Matches |
$12X*567 | 1#Zv_96 | +678jhgt@erd |
Author |
Rating:
lawson law
|
Title |
Test
Details
Pattern Title
|
Expression |
,(?!(?<=(?:^|,)\s*\x22(?:[^\x22]|\x22\x22|\\\x22)*,)(?:[^\x22]|\x22\x22|\\\x22)*\x22\s*(?:,|$)) |
Description |
This regex can be used to split the values of a comma delimitted list. List elements may be quoted, unquoted or empty. Commas inside a pair of quotation marks are not matched. |
Matches |
1,,3""but, wait",5 | 1,2,3 |
Non-Matches |
"Test""a,b,c,d""ing" | no comma | semi; colon |
Author |
Rating:
Michael Ash
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$ |
Description |
This will grep for a valid MAC address , with colons seperating octets. It will ignore strings too short or long, or with invalid characters. It will accept mixed case hexadecimal. Use extended grep. |
Matches |
01:23:45:67:89:ab | 01:23:45:67:89:AB | fE:dC:bA:98:76:54 |
Non-Matches |
01:23:45:67:89:ab:cd | 01:23:45:67:89:Az | 01:23:45:56: |
Author |
Rating:
Ted Rudyk
|
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]{2}[-][0-9]{2}[-][0-9]{2}$ |
Description |
Validates a UK Bank Sort code |
Matches |
09-01-29 | 05-06-25 |
Non-Matches |
090125 |
Author |
Rating:
Richard Slade
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{5}((|-)-\d{4})?)|([A-Za-z]\d[A-Za-z][\s\.\-]?(|-)\d[A-Za-z]\d)|[A-Za-z]{1,2}\d{1,2}[A-Za-z]? \d[A-Za-z]{2}$ |
Description |
Allows Canadian, American and UK postal/zip codes. Allowing hyphens, periods, or spaces to separate. |
Matches |
N9B.1Y8 | 90210-1234 | NE21 6EQ |
Non-Matches |
NN8 Y83 |
Author |
Rating:
Russell Anderson
|
Title |
Test
Details
Pattern Title
|
Expression |
^\(?[\d]{3}\)?[\s-]?[\d]{3}[\s-]?[\d]{4}$ |
Description |
This regular expression matches 10 digit US Phone numbers in different formats. Some examples are
1)area code in paranthesis.
2)space between different parts of the phone number.
3)no space between different parts of the number.
4)dashes between parts.
|
Matches |
(573)8841878 | 573-884-1234 | 573 234 1256 |
Non-Matches |
(573)(673)2345 | 573-12-2345 |
Author |
Rating:
kode kode
|
Title |
Test
Details
Pattern Title
|
Expression |
(\s*\(?0\d{4}\)?\s*\d{6}\s*)|(\s*\(?0\d{3}\)?\s*\d{3}\s*\d{4}\s*) |
Description |
UK Phone Number Allows leading and trailing spaces and optional spaces after the dialing code.
Initially the expression I posted was
\s*0\d{4}\s*\d{6}\s*|\s*0\d{3}\s*\d{7}\s*
But this didn't include optional brackets e.g. (01603) 123123 or phone numbers in a London format e.g. 0208 123 1234 |
Matches |
01603 123123 | 0207 1234567 | (0208) 123 1234 |
Non-Matches |
123 123132 |
Author |
Rating:
Joe Gass
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?=.*\d).{4,8}$ |
Description |
Password expression. Password must be between 4 and 8 digits long and include at least one numeric digit. |
Matches |
1234 | asdf1234 | asp123 |
Non-Matches |
asdf | asdf12345 | password |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
(?:\d|I{1,3})?\s?\w{2,}\.?\s*\d{1,}\:\d{1,}-?,?\d{0,2}(?:,\d{0,2}){0,2} |
Description |
This RE validates standard Bible verse notation. |
Matches |
Genesis 3:3-4,6 | II Sam 2:11,2 | 2 Tim 3:16 |
Non-Matches |
Genesis chap 3, verse 3 | 2nd Samuel 2 |
Author |
Rating:
Scott Kahler
|
Title |
Test
Details
Pattern Title
|
Expression |
((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4} |
Description |
US Phone Number -- doesn't check to see if first digit is legal (not a 0 or 1). |
Matches |
(123) 456-7890 | 123-456-7890 |
Non-Matches |
1234567890 |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-1])*$
|
Description |
Expression validating a Binary string of any length |
Matches |
10101000 | 01010000 | 100000001 |
Non-Matches |
01000200 | 00021000 | e10000000 |
Author |
Rating:
Cliff Wagner
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{3}-\d{7}[0-6]{1}$ |
Description |
Airway bill no that allows only the format 999-99999998 and does not allow the last digit to be 7,8,9. |
Matches |
999-99999995 | 123-47859683 | 156-78965422 |
Non-Matches |
123-47859689 | 9999999999 | 9588-58964 |
Author |
Rating:
DOZENROSES T
|
Title |
Test
Details
Pattern Title
|
Expression |
^([A-Za-z]\d[A-Za-z][-]?\d[A-Za-z]\d) |
Description |
Regular expression to match a canadian postal code where it matches a string with or without the hyphen and in upercase or lowercase |
Matches |
a1a-1a1 | A1A1A1 |
Non-Matches |
1a1-a1a | aaa-aaa | 111-111 |
Author |
Rating:
Rico lour
|
Title |
Test
Details
Pattern Title
|
Expression |
^([a-z0-9]{32})$ |
Description |
Matches a md5 hash, simple yet powerful |
Matches |
790d2cf6ada1937726c17f1ef41ab125 |
Non-Matches |
790D2CF6ADA1937726C17F1EF41AB125 | 790d2cf6ada1937726c17f1ef41ab125f6k |
Author |
Rating:
Thijs Wijnmaalen
|
Title |
Test
Details
Pattern Title
|
Expression |
^[A-Za-z]{6}[0-9LMNPQRSTUV]{2}[A-Za-z]{1}[0-9LMNPQRSTUV]{2}[A-Za-z]{1}[0-9LMNPQRSTUV]{3}[A
-Za-z]{1}$ |
Description |
Check italian fiscal code (codice fiscale) with "OMOCODIA" control |
Matches |
BTTNDR78R06A79QU |
Non-Matches |
BTTNDR78R06A79AU |
Author |
Rating:
andrea mele
|
Displaying page
of
pages;
Items to