104 regular expressions found in this category!
Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
(^\([0]\d{2}\))(\d{6,7}$) |
Description |
Validator for New Zealand Mobile phone numbers. Will look for the first number being a 0 and must be a number or either 6 or 7 digits long after to initial (021) suffix |
Matches |
(021)1234567 | (021)123456 | (000)000000 |
Non-Matches |
(123)1234567 | 025123456 | 0252345678 |
Author |
Rating:
Not yet rated.
Graeme Allwood
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9]{2})?((\([0-9]{2})\)|[0-9]{2})?([0-9]{3}|[0-9]{4})(\-)?[0-9]{4}$ |
Description |
A simple expression to brazilian phone number code modified expression of Rafael, beyond international code, simple DDI without "+" 99 plus simple DDD (99) plus simple and whitout parentheses em trace, local phone number 3 or 4 digits plus "-" plus 4 digits. |
Matches |
552123236699 | 212323-6699 | 2323-6699 |
Non-Matches |
[3434-3432] | [4(23)232-3232] | [55(2)232-232] |
Author |
Rating:
Not yet rated.
wallace dos santos damiao
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}((\-|\s)?\d{4})?$ |
Description |
Single field zip code validator useful for web forms, where user may enter 5 digit or 9 digit zip code, and may use hyphen, space, or no space between the first 5 digits and last 4 digits. |
Matches |
92078 | 92078-4705 | 92078 4705 |
Non-Matches |
920781 | 920a87 | 920 |
Author |
Rating:
Not yet rated.
MARK J KRISBURG
|
Title |
Test
Details
Pattern Title
|
Expression |
^[1-9]{1}[0-9]{3}\s{0,1}?[a-zA-Z]{2}$ |
Description |
Used for dutch postalcodes; no leading zero. 4 numbers and 2 letters. |
Matches |
1234AB | 1234 AB | 1234 ab |
Non-Matches |
0123AB | 123AA |
Author |
Rating:
Not yet rated.
Michiel Lankamp
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{2}-\d{2})*$ |
Description |
This expression is a simplex expression that checks to see if a value is a valid phone system terminal number. It allows a null value or 2 digits, dash, 2 digits. Written by Jason N. Gaylord. |
Matches |
00-00 | 54-68 |
Non-Matches |
1235 | 0 | 5-789 |
Author |
Rating:
Not yet rated.
Jason N. Gaylord
|
Title |
Test
Details
Pattern Title
|
Expression |
^[1-9]{1}[0-9]{3}\s?[A-Z]{2}$ |
Description |
Postcode for the Netherlands |
Matches |
1234AB | 1234 AB |
Non-Matches |
123BBB | 023AB |
Author |
Rating:
Not yet rated.
de kleine Gerardus
|
Title |
Test
Details
Pattern Title
|
Expression |
[0-9]{4}[A-Z]{2} |
Description |
Match for dutch zipcodes.
Dutch zipcodes are always in the format of 4 digits and 2 letters. |
Matches |
1000AB | 3035KA | 9999ZZ |
Non-Matches |
AA1000 | Z1000 | 1000-CC |
Author |
Rating:
Not yet rated.
marrik
|
Title |
Test
Details
Pattern Title
|
Expression |
^((\d[-. ]?)?((\(\d{3}\))|\d{3}))?[-. ]?\d{3}[-. ]?\d{4}$ |
Description |
This is a pretty flexable phone number validator for US numbers. Allows optional country code and area code. Allows separation of numbers with " ", "-", "." or nothing to seperate. Area codes can be in parenthesis or not. Validates that you'll get 7, 10, or 11 digits in the way the most number of people option when writing them. |
Matches |
1(555)444-3333 | 202.555.3333 | 555-4444 |
Non-Matches |
555-222-33334 | 1(303)5a4-5555 | 1 202) 111-3333 |
Author |
Rating:
Not yet rated.
Josh Aversa
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{3}-\d{3}-\d{4})*$ |
Description |
This expression is a very simplex expression that allows null values or 3 digits, dash, 3 digits, dash, 4 digits. It validates a basic US phone number. Written by Jason N. Gaylord. |
Matches |
555-555-1212 | 123-456-7890 |
Non-Matches |
555.555.1212 | (555) 555-1212 | 5555551212 |
Author |
Rating:
Not yet rated.
Jason N. Gaylord
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9]{5})([\-]{1}[0-9]{4})?$ |
Description |
Validates against a U.S. postal code in either a 5 digit format or a 5 dash 4 format. |
Matches |
18017 | 18017-1401 |
Non-Matches |
1801A | 18017- | 18017-152A |
Author |
Rating:
Not yet rated.
Jeff Johns
|
Title |
Test
Details
Pattern Title
|
Expression |
(^0.*[1-9]*)|(^860+)|(^8613)|(\D)|([0-9]) |
Description |
forbidden tele numbers when it starts with 0,
860+,8613,character or has any SBC case.
you can also use it to any international phone dialed by E1 ,etc . this regex has been tested by java, perl,.net
PS: the last regex [0-9]is in SBC case |
Matches |
0234568 | 8601063971622 | 1-221555 |
Non-Matches |
861063971622 |
Author |
Rating:
Not yet rated.
qi gao
|
Title |
Test
Details
Pattern Title
|
Expression |
^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$ |
Description |
US Telephone Number where this is regular expression excludes the first number, after the area code,from being 0 or 1; it also allows an extension
to be added where it does not have to be prefixed by 'x'. |
Matches |
(910)456-7890 | (910)456-8970 x12 | (910)456-8970 1211 |
Non-Matches |
(910) 156-7890 | (910) 056-7890 | (910) 556-7890 x |
Author |
Rating:
Not yet rated.
Bill Anderson
|
Title |
Test
Details
Pattern Title
|
Expression |
^0(6[045679][0469]){1}(\-)?(1)?[^0\D]{1}\d{6}$ |
Description |
Validates Austrian Cellular Phone Numbers. Works with ONE, T-Mobile, A1, Telering and new Provider "Drei". WITHOUT Country Code Verification. |
Matches |
0664-1234567 | 06641234567 | 0699-11234567 |
Non-Matches |
06991-1234567 | +43650-1234567 | 07661234567 |
Author |
Rating:
Not yet rated.
Stefan Beylen
|
Title |
Test
Details
Pattern Title
|
Expression |
^[+][0-9]\d{2}-\d{3}-\d{4}$ |
Description |
This is a basic telephone number vaildation which needs a compulsory prefix of a '+' sign with three digits and followed by a hipen, another three digits and finally followed by another hipen and four more digits.
Regards,
Senthil Gunabalan |
Matches |
+974-584-5656 | +000-000-0000 | +323-343-3453 |
Non-Matches |
974-584-5656 | +974 000 0000 |
Author |
Rating:
Not yet rated.
Senthil Gunabalan
|
Title |
Test
Details
Pattern Title
|
Expression |
^[A-Za-z]{1,2}[\d]{1,2}([A-Za-z])?\s?[\d][A-Za-z]{2}$ |
Description |
UK Postal Codes - The code is normally written in capital letters with a space between the outer and inner parts; it is understandable if the space is omitted.
This regular expression validates upper or lower case with or without the space:
|
Matches |
CF1 2AA | cf564fg |
Non-Matches |
a1234d | A12 77Y |
Author |
Rating:
Not yet rated.
Scott Pite
|
Title |
Test
Details
Pattern Title
|
Expression |
^((([A-PR-UWYZ])([0-9][0-9A-HJKS-UW]?))|(([A-PR-UWYZ][A-HK-Y])([0-9][0-9ABEHMNPRV-Y]?))\s{0,2}(([0-9])([ABD-HJLNP-UW-Z])([ABD-HJLNP-UW-Z])))|(((GI)(R))\s{0,2}((0)(A)(A)))$ |
Description |
Validates UK postcodes and aligns in parenthesized subpatterns according to standard UK postcode elements. Validation is according to guidelines outlined at http://www.govtalk.gov.uk/gdsc/html/noframes/PostCode-2-1-Release.htm
Postcode elements are separated according to description at http://www.graticule.com/data/uk/pcdata.html
Expression is not thoroughly tested, but seems to be doing ok so far!
Comments and improvements welcome. |
Matches |
GIR 0AA | SW1Y 1AA | AB1 4BL |
Non-Matches |
XVJ P09 | GB7Z 1HQ | Q1 1AA |
Author |
Rating:
Not yet rated.
Christopher Townson
|
Title |
Test
Details
Validate US Postal Code
|
Expression |
^(?!00000)(?<zip>(?<zip5>\d{5})(?:[ -](?=\d))?(?<zip4>\d{4})?)$ |
Description |
Validate US zip codes. Matches all zip codes of exactly 5 digits except 00000. Optionally, matches zip5+zip4 where zip5 is exactly 5 digits, zip4 is exactly 4 digits, and zip5 and zip4 are, optionally, separated by a single space or hyphen. Captures zip5 and zip4 to named groups to facilitate program manipulation. |
Matches |
12345 | 123456789 | 12345-6789 |
Non-Matches |
12345- | 00000 | 00000-6789 |
Author |
Rating:
Not yet rated.
Jerry Schmersahl
|
Title |
Test
Details
Pattern Title
|
Expression |
[0-9]{4}\s*[a-zA-Z]{2} |
Description |
Dutch zip code expression
4 numbers - space yes/no - 2 letters
|
Matches |
1054 WD | 1054WD | 1054 wd |
Non-Matches |
10543 |
Author |
Rating:
Not yet rated.
Roland Mensenkamp
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?!\d[1]{2}|[5]{3})([2-9]\d{2})([. -]*)\d{4}$ |
Description |
Validates *usable* US telephone numbers (possibly Canadian and Caribbean Islands as well?) Numbers cannot beginning with zero, one, (any number)11, or 555. It will allow either a hyphen, space or period as a separator.
Technically (and contrary to popular belief) most 555- numbers ARE valid numbers [see http://www.nanpa.com/nas/public/form555MasterReport.do?method=display555MasterReport ] but they are unlikely to be used by normal folks. Therefore, excluding them with this regex is useful to prevent bogus/fraudulent telephone numbers in forms.
FYI, the fictitious 555- numbers used in the movies and TV are only in the range of 555-0100 through 555-0199. Not very many, huh? |
Matches |
222-2222 | 295-5000 |
Non-Matches |
555-1234 | 411-5555 | 099-9999 |
Author |
Rating:
Not yet rated.
JP Honeywell
|
Title |
Test
Details
Pattern Title
|
Expression |
^\({0,1}0(2|3|7|8)\){0,1}(\ |-){0,1}[0-9]{4}(\ |-){0,1}[0-9]{4}$ |
Description |
Expression to parse Australian landline telephone numbers. Will only accept valid STD codes. Allows for brackets around the STD code and either spaces or dashes between number groups. |
Matches |
(02) 9323 1234 | 0293231234 | 02-9323-1234 |
Non-Matches |
01 9323 1234 | 02 932 123 | 02/9323/1234 |
Author |
Rating:
Not yet rated.
Ben Vaughan
|
Displaying page
of
pages;
Items to