Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$) |
Description |
Australian phone numbers: Matches all known formats incl normal 10-digit landline numbers (valid area code mandatory) 13, 1300, 1800, 1900, 1902 plus mobile 10 and 11-digit formats. Use a Replace function first to remove non-numerics which are probably separators (E.g. newNum = number.replace(/[\D]/g, ""). Please contact me if you find any valid Aussie numbers being rejected. |
Matches |
0732105432 | 1300333444 | 131313 |
Non-Matches |
32105432 | 13000456 |
Author |
Rating:
Bill Hely
|
Title |
Test
Details
Pattern Title
|
Expression |
(^(4|5)\d{3}-?\d{4}-?\d{4}-?\d{4}|(4|5)\d{15})|(^(6011)-?\d{4}-?\d{4}-?\d{4}|(6011)-?\d{12})|(^((3\d{3}))-\d{6}-\d{5}|^((3\d{14}))) |
Description |
This provides an expression to calidate the four major credit cards. It can be easily broken up to use for a specific type of card. It does not validate the number being a potential real number, only in the correct format. |
Matches |
4111-1234-1234-1234 | 6011123412341234 | 3711-123456-12345 |
Non-Matches |
1234567890123456 | 4111-123-1234-1234 | 412-1234-1234-1234 |
Author |
Rating:
Chris Love
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9]{6}[\s\-]{1}[0-9]{12}|[0-9]{18})$ |
Description |
This regular expression matches 'Switch' card numbers - a payment method used extensively in the UK. |
Matches |
000000 000000000000 | 000000-000000000000 | 000000000000000000 |
Non-Matches |
000000_000000000000 |
Author |
Rating:
Not yet rated.
Scott Frampton
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$ |
Description |
Matches U.S. dates with leading zeros and without and with 2 or four digit years |
Matches |
01/01/2001 | 1/1/2001 | 01/1/01 |
Non-Matches |
13/01/2001 | 1/2/100 | 09/32/2001 |
Author |
Rating:
Chris Becker
|
Title |
Test
Details
Pattern Title
|
Expression |
^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$ |
Description |
Matches currency input with or without commas. |
Matches |
$3,023,123.34 | 9,876,453 | 123456.78 |
Non-Matches |
4,33,234.34 | $1.234 | abc |
Author |
Rating:
Brian Orrell
|
Title |
Test
Details
Pattern Title
|
Expression |
((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2})) |
Description |
This matches simple dates against 1 or 2 digits for the month, 1 or 2 digit for the day, and either 2 or 4 digits for the year |
Matches |
4/5/91 | 04/5/1991 | 4/05/89 |
Non-Matches |
4/5/1 |
Author |
Rating:
Andrew Lader
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$ |
Description |
A regular expression to match phone numbers, allowing for an international dialing code at the start and hyphenation and spaces that are sometimes entered. |
Matches |
(+44)(0)20-12341234 | 02012341234 | +44 (0) 1234-1234 |
Non-Matches |
(44+)020-12341234 | 12341234(+020) |
Author |
Rating:
James Burton
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}(-\d{4})?$ |
Description |
Matches standard 5 digit US Zip Codes, or the US ZIP + 4 Standard. |
Matches |
48222 | 48222-1746 |
Non-Matches |
4632 | Blake | 37333-32 |
Author |
Rating:
Blake Facey
|
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 |
^[0-9]{4}\s{0,1}[a-zA-Z]{2}$ |
Description |
Regular expression to evaluate dutch zipcodes. This is an updated version of Roland Mensenkamp. |
Matches |
2034AK | 2034 AK | 2034 ak |
Non-Matches |
2034 AK | 321321 AKSSAA |
Author |
Rating:
Not yet rated.
Jon van Leuven
|
Title |
Test
Details
Pattern Title
|
Expression |
(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1} |
Description |
Will match the following date formats: Preceded by a Space, Left-parentheses, or at the beginning of a line. Followed by a Space, Right-parentheses, or Colon(:), word boundary or End of line. Can have / or - as separator. Accepts 2 digit year 00-99 or 4 digit years 1900-2099 (can modify to accept any range) |
Matches |
01/01/2001 | 01-01-2001: | (1-1-01) |
Non-Matches |
13/1/2001 | 1-32-2001 | 1-1-1801 |
Author |
Rating:
David Good
|
Title |
Test
Details
Pattern Title
|
Expression |
\b(\w+)\s+\1\b |
Description |
Uses backreferences and word boundaries to match repeated words seperated by whitespace without matching a word with the same ending as the next words beginning.
|
Matches |
Tell the the preacher | some some | hubba hubba |
Non-Matches |
once an annual report | mandate dated submissions | Hubba hubba |
Author |
Rating:
Not yet rated.
Sean Carley
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{9}[\d|X]$ |
Description |
A very simple ISBN validation expression - it just checks for a 10 digit number where the last digit could also be a capital 'X'. Complete specs for ISBN available here:
http://www.isbn.org/standards/home/isbn/international/html/usm4.htm. An enhancement would be to allow exactly 3 or 0 hyphens or 3 or 0 spaces, since these are also valid formats. |
Matches |
1234123412 | 123412341X |
Non-Matches |
not an isbn |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$ |
Description |
Dates
day: d or dd, <= 31,
month: m or mm, <= 12,
year: yy or yyyy >= 1900, <= 2099
|
Matches |
01/01/2001 | 1/1/1999 | 10/20/2080 |
Non-Matches |
13/01/2001 | 1/1/1800 | 10/32/2080 |
Author |
Rating:
Scott Thompson
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$ |
Description |
This is a pattern to search and verify that a decimal number ends with a 25, 50, 75, 0 or 00. It does match for a nothing after decimal also but I guess thats ok !! |
Matches |
0.25 | .75 | 123.50 |
Non-Matches |
.77 | 1.435 |
Author |
Rating:
narsi v
|
Title |
Test
Details
Pattern Title
|
Expression |
^(s-|S-){0,1}[0-9]{3}\s?[0-9]{2}$ |
Description |
Validates swedish zipcodes (postnr) with or without space between groups. With leading s- or not. Can be disconnected by removing ''(s-|S-){0,1}''. |
Matches |
12345 | 932 68 | S-621 46 |
Non-Matches |
5367 | 425611 | 31 545 |
Author |
Rating:
Not yet rated.
Tommy Ullberg
|
Title |
Test
Details
Pattern Title
|
Expression |
((0?[13578]|10|12)(-|\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2}))) |
Description |
Regex used in .NET to validate a date. Matches the following formats mm/dd/yy, mm/dd/yyyy, mm-dd-yy, mm-dd-yyyy
This covers days with 30 or 31 days but does not handle February, it is allowed 30 days. |
Matches |
1/31/2002 | 04-30-02 | 12-01/2002 |
Non-Matches |
2/31/2002 | 13/0/02 | Jan 1, 2001 |
Author |
Rating:
Sean McAnally
|
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 |
<[^>]*\n?.*=("|')?(.*\.jpg)("|')?.*\n?[^<]*> |
Description |
Match any image insert in a tag .
simply replace the .jpg in the pattern whit a variable of content type ex:.swf,.js,.gif and loop the pattern to retrieve all tag whit the contenttype pass trought....
Very useful when you have people uploading html document in your site and you want to retrieve all dependecy. |
Matches |
<td background="../img/img.jpg" > | <img src=img.jpg > | <img src='img.jpg' |
Non-Matches |
= img.jpg | img.jpg |
Author |
Rating:
Not yet rated.
Marc-Antoine Latour
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$ |
Description |
This is a modification of the zip code regular expression submitted by Steven Smith ( [email protected])
It no longer matches 78754-12aA |
Matches |
78754 | 78754-1234 | G3H 6A3 |
Non-Matches |
78754-12aA | 7875A | g3h6a3 |
Author |
Rating:
Khoi Pham
|
Displaying page
of
pages;
Items to