104 regular expressions found in this category!
Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^(\(?\d\d\d\)?)?( |-|\.)?\d\d\d( |-|\.)?\d{4,4}(( |-|\.)?[ext\.]+ ?\d+)?$ |
Description |
Basic US phone number matching pattern. I found this place and used a regex, so figured I'd share. |
Matches |
(888) 555-1212 | 888.555.1212 | (888) 555.1212 ext. 1212 |
Non-Matches |
(800) got-fish | 011+ 78907 2344323 |
Author |
Rating:
Not yet rated.
Jon Stephens
|
Title |
Test
Details
Pattern Title
|
Expression |
(^\d{5}$)|(^\d{5}-\d{4}$) |
Description |
I know its probaly in the library, but i did not see it.
US zip pattern
5 digits 01234 or 5 digits + 4 01234-1234 |
Matches |
12345 | 12345-6789 | 01234 |
Non-Matches |
1A234 | 12345-aaaa | 12345 1234 |
Author |
Rating:
Not yet rated.
Jay Solomon
|
Title |
Test
Details
Pattern Title
|
Expression |
(?<Telephone>([0-9]|[ ]|[-]|[\(]|[\)]|ext.|[,])+)([ ]|[:]|\t|[-])*(?<Where>Home|Office|Work|Away|Fax|FAX|Phone)|(?<Where>Home|Office|Work|Away|Fax|FAX|Phone|Daytime|Evening)([ ]|[:]|\t|[-])*(?<Telephone>([0-9]|[ ]|[-]|[\(]|[\)]|ext.|[,])+)|(?<Telephone>([(]([0-9]){3}[)]([ ])?([0-9]){3}([ ]|-)([0-9]){4})) |
Description |
Its extracts telephone numbers |
Matches |
(913) 451-6461 |
Non-Matches |
3523d3adb3 |
Author |
Rating:
Not yet rated.
Manpreet Grewal
|
Title |
Test
Details
Pattern Title
|
Expression |
^[S-s]( |-)?[1-9]{1}[0-9]{2}( |-)?[0-9]{2}$ |
Description |
Swedish postcodes (as far as i know) |
Matches |
S-123 45 | s 123 45 | S123-45 |
Non-Matches |
Se12345 |
Author |
Rating:
Not yet rated.
paul Snabilie
|
Title |
Test
Details
Pattern Title
|
Expression |
^[a-zA-Z\d]+(([\'\,\.\- #][a-zA-Z\d ])?[a-zA-Z\d]*[\.]*)*$ |
Description |
Address
It has now been enhanced to accept # too!! |
Matches |
393 12th St. City, State Zip code |
Non-Matches |
12 street @@@ |
Author |
Rating:
Not yet rated.
Sadaf Ahmed
|
Title |
Test
Details
Pattern Title
|
Expression |
^[D-d][K-k]-[1-9]{1}[0-9]{3}$ |
Description |
Postalcode Danmark |
Matches |
Dk-1234 | dk-1234 | DK-1234 |
Non-Matches |
DK 1234 | DK 12345 |
Author |
Rating:
Not yet rated.
paul Snabilie
|
Title |
Test
Details
Pattern Title
|
Expression |
^[D-d][K-k]( |-)[1-9]{1}[0-9]{3}$ |
Description |
match all danish postal code
update from last danish postal code expression |
Matches |
DK-1234 | dk 1234 | Dk-1234 |
Non-Matches |
DK 12345 |
Author |
Rating:
Not yet rated.
paul Snabilie
|
Title |
Test
Details
Modified UK Phone Number
|
Expression |
^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?\d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3}))?$ |
Description |
Modified version of UK phone number regular expression. Now allows +44 national code in addition to extension numbers of 3 or 4 digits. Previous expression was: ^((\(?0\d{4}\)?\s?\d{3}\s?\d{3})|(\(?0\d{3}\)?\s?\d{3}\s?\d{4})|(\(?0\d{2}\)?\s?\d{4}\s?\d{4}))(\s?#(\d{4}|\d{3}))?$ |
Matches |
+447222555555 | +44 7222 555 555 | (0722) 5555555 #2222 |
Non-Matches |
(+447222)555555 | +44(7222)555555 | (0722) 5555555 #22 |
Author |
Rating:
Not yet rated.
Amos Hurd
|
Title |
Test
Details
Pattern Title
|
Expression |
(\d{4,6}) |
Description |
Simple Postcode - this is the first test of the new WebService :-) |
Matches |
4078 | 539999 |
Non-Matches |
dfasdf | afasdfsad |
Author |
Rating:
Not yet rated.
Darren Neimke
|
Title |
Test
Details
Pattern Title
|
Expression |
((\(\d{3}\) ?)|(\d{3}[- \.]))?\d{3}[- \.]\d{4}(\s(x\d+)?){0,1}$ |
Description |
This will match US most common telephones format with extension or with out extension. Works with both Java and .NET. |
Matches |
(123) 456-7890 | (123) 456-7890 x123 |
Non-Matches |
(123) 456-7890 x123x | (123) 456-7890 x123 x123 | (123) 456-7890 x |
Author |
Rating:
Not yet rated.
khoi le
|
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]{5}([\s-]{1}[0-9]{4})?$ |
Description |
My first Expression. This will match US postal codes (zip codes) using simple 5 digit format with optional 4 digit extention seperated by a space or hyphen. Will not accept letters.
example: 12345 or 12345-1234 or 12345 1234. |
Matches |
12345-1234 | 12345 | 12345 1234 |
Non-Matches |
123451234 | 12345 a345 | a2345-1234 |
Author |
Rating:
Not yet rated.
Ed Stafford
|
Title |
Test
Details
Pattern Title
|
Expression |
^0{0,1}[1-9]{1}[0-9]{2}[\s]{0,1}[\-]{0,1}[\s]{0,1}[1-9]{1}[0-9]{6}$ |
Description |
The regex that matches the telephone numbers in India.
####Enjoy Regex#### |
Matches |
0493 - 3227341 | 0493 3227341 | 493 3227341 |
Non-Matches |
93 0227341 | 493 322734111 | 493 -- 3227341 |
Author |
Rating:
Not yet rated.
Vathachira Joseph Bino
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?:\([2-9]\d{2}\)\ ?|(?:[2-9]\d{2}\-))[2-9]\d{2}\-\d{4}$ |
Description |
This US phone number edit with restricted format options: Accepts optional parens on area code with or without following space, and dashes between area code, central office code and station code. Formats include only (222) 555-1212 (with or without a space) and 222-555-1212. Conforms to NANP A-digit and D-digit requirements (ANN-DNN-NNNN). Area Codes 001-199 are not permitted; Central Office Codes 001-199 are not permitted. |
Matches |
(234) 555-1212 | (234)555-1212 | 234-555-1212 |
Non-Matches |
(234)5551212 | 234 555 1212 | 234) 555-1212 |
Author |
Rating:
Not yet rated.
Don Johnston
|
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]{5}$ |
Description |
Matches german standard postal codes named 'Postleitzahl' |
Matches |
03242 | 36260 | 12394 |
Non-Matches |
3520 | 102 | 100202 |
Author |
Rating:
Not yet rated.
Kevin Wennemuth
|
Title |
Test
Details
Pattern Title
|
Expression |
(\s*\(?0\d{4}\)?(\s*|-)\d{3}(\s*|-)\d{3}\s*)|(\s*\(?0\d{3}\)?(\s*|-)\d{3}(\s*|-)\d{4}\s*)|(\s*(7|8)(\d{7}|\d{3}(\-|\s{1})\d{4})\s*) |
Description |
another uk telephone number regex. This was adapted from another on this site http://www.regexlib.com/REDetails.aspx?regexp_id=297
I added support for hyphens and for london shorthand numbers ie. 8234-1234 72341234 Still want to be permissive where possible....Still need to sort out the all zeros, also not sure if numbers with 4 digits followed by 7 used in london 0208-234-1234 is the area of the uk where this occurs, or all areas outside of london are in format 5 digits followed by 6 digits ie. 01608 123456. If that is the case for the 4-7 pattern only 0208 or 0207 could be enforced. |
Matches |
0208 993 5689 | 0208-993-5689 | 89935689 |
Non-Matches |
1608 123 456 |
Author |
Rating:
Not yet rated.
Matt Baskey
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9]*\-?\ ?\/?[0-9]*)$ |
Description |
Match italian telephone number with prefix followed by "/", "-" or blank and number. Usefull with numeric keybord! |
Matches |
02-343536 | 02/343536 | 02 343536 |
Non-Matches |
02a343536 | 02+343536 |
Author |
Rating:
Not yet rated.
Giorgio Spugnesi
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?:(?<1>[(])?(?<AreaCode>[2-9]\d{2})(?(1)[)][ ]?|[- \/.]?))?
(?<Prefix>[1-9]\d{2})[- .]?(?<Suffix>\d{4})
(?:(?:[ ]+|[xX]|Ext\.?[ ]?){1,2}(?<Ext>\d{1,5}))?$ |
Description |
PCRE (PHP) regular expression for validating US telephone numbers with OPTIONAL area code, and OPTIONAL extension. Promiscuous formatting (parenthesis or slash, space, dash, dot or no separator). Captures the telephone number area code, prefix, suffix, and extension to named groups. Rejects area codes that begin with 0 or 1 and prefixes that begin with 0. Rejects all telephone numbers that do not match on exactly 7 digits, or on exactly 10 digits with the optional area code, not counting the extension or the format. Seperators, when used, must be in the right place. Extension can be preceded by a space(s) and/or "x", "X", or "Ext" and matches on 1 to 5 digits.
Written from the view that getting phone numbers from customers should be as easy and tolerant as possible. Matched number can be parsed and entered into database correctly on the business end.
Based on similar regex by Jerry Schmersahl in this library. Case insensitivity could simplify this expression, but implementation is left up to you.
For PHP/PCRE compatibility, put a "P" in front of each capture name (ie: "(?P<AreaCode>"). This server does not recognize the Python/PCRE naming convention. |
Matches |
785/3215564x51337 | (785)321-5564 Ext. 51337 | 321.5564 x5 |
Non-Matches |
785321556 | (785)321-5564 x | 7853 215567 |
Author |
Rating:
Not yet rated.
Bret Greenwood
|
Title |
Test
Details
Pattern Title
|
Expression |
^([2-9])(\d{2})(-?|\040?)(\d{4})( ?|\040?)(\d{1,4}?|\040?)$ |
Description |
A regular expression that validates the any format of fixed telephone numbers inside Lima - Peru, including an optional extension of at least one number up to four numbers. |
Matches |
263-8854 | 5660578 1235 | 622-4588 21 |
Non-Matches |
1227585 | 4224586 50124 | 0554499 |
Author |
Rating:
Not yet rated.
Alan Ferrandiz Langley
|
Title |
Test
Details
Pattern Title
|
Expression |
^([8-9])([1-9])(\d{2})(-?|\040?)(\d{4})$ |
Description |
A regular expression that validates the any of the new formats of cellular phones numbers in Peru, allows an optional dash in the middle of the number. |
Matches |
8874-2544 | 99106800 | 84509955 |
Non-Matches |
6540-9985 | 77329390 | 725-2763 |
Author |
Rating:
Not yet rated.
Alan Ferrandiz Langley
|
Displaying page
of
pages;
Items to