RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 256 regular expressions found.

Change page:   |    Displaying page 12 of 13 pages; Items 221 to 240
Title Test Details U.S. and Canadian postal codes
Expression
^((\d{5}-?\d{4})|(\d{5})|([A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d))$
Description
This expression more loosely matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen (optional), and then 4 numeric digits. The Canadian postal code must be of the form ANANAN where A is any alphabetic character (case insensitive) and N is a numeric digit from 0 to 9. A space between the 2nd "A" and 2nd "N" is optional but not required, so the form could also be interpreted as "ANA NAN"
Matches
90210, 90210-1234, 902101234, H0H0H0, h0h0h0, H0H 0H0, h0h 0h0
Non-Matches
9021090210, California, ABC123, ABC 123, H0H H0H
Author Rating: Not yet rated. Douglas Barbin
Title Test Details Saudi Mobile
Expression
05\d{8}
Description
Saudi mobile numbers must start with 05 and just accepts 10 digits
Matches
059ddddddd , 053dddddddd , 054dddddddd , 056dddddddd,053dddddd
Non-Matches
01dddddddd
Author Rating: The rating for this expression. Shoodatubcuth
Title Test Details Numeric with decimal and negative
Expression
^-?[0-9]\d{0,8}(\.\d{1,4})
Description
Numeric with decimal values. Accepts negative and zeros. Upto 9 digits and upto 4 decimals allowed
Matches
123456789.1234, -123.123, 0.00, -123456789.1234
Non-Matches
1234567890,0.12345
Author Rating: Not yet rated. Bhavin Shah
Title Test Details Mobile Number Validation
Expression
^([7-9]{1})([0-9]{9})$
Description
Mobile Number starts with 7,8,9 and total 10 digits
Matches
9848457682
Non-Matches
123456789
Author Rating: Not yet rated. Bhanu Prakash
Title Test Details Data com ano bissexto (Date with leap year)
Expression
^((29\/0?2\/[0-9]{0,2}(04|08|92|96|([1|3|5|7][2|6])|[2|4|6|8][0|4|8]))|(((28|[12][0-7]|0?[1-9])\/0?2)|((30|[12][0-9]|0?[1-9])\/(0?(4|6|9)|11))|((31|[12][0-9]|0?[1-9])\/(0?(1|3|5|7|8))|(10|12)))\/(\d{2}|\d{4}))$
Description
Datas com os anos bissextos. Anos de 2 ou 4 digitos Dates with leap years. Years 2 or 4 digits
Matches
31/01/2012 | 30/4/2012 | 10/01/12 | 29/2/2012
Non-Matches
31/01/013 | 31/4/2013 | 29/2/2002 | 29/2/2000
Author Rating: Not yet rated. Andre Banderas
Title Test Details PAC Code
Expression
^[a-zA-Z]{3}[0-9]{6}$
Description
Simple Pac code regex, first 3 should be letters and last 6 should be digits.
Matches
abc123456 | ptx654321
Non-Matches
abc 123456 | ab12345x | abc12345
Author Rating: Not yet rated. Dimitri Kouvdis
Title Test Details UK Company Number
Expression
^(([0-9]{2})|([a-zA-Z][0-9])|([a-zA-Z]{2}))[0-9]{6}$
Description
Matches a UK company number. According to HMRC these must have 8 digits, of which up to the first two may be an alpha prefix. This doesn't test for validity of the prefix.
Matches
12345678, OC123456, SC058132, R7654321
Non-Matches
1234567, AB1324567
Author Rating: Not yet rated. Graham Harper
Title Test Details n of digits with any number of spaces
Expression
^(\s*\d\s*){11}$
Description
here n=11; matches: 012 34 123456 ; 012 34 123 456 ; 01234 123456
Matches
012 34 123456
Non-Matches
012 34 123456 0
Author Rating: Not yet rated. kibria
Title Test Details Find "to" 4 digit SMS number
Expression
(t|T)(o|O)\s\d{4}($|\D)
Description
Catch text containing "to " followed by 4 digit number. Not more than 4 digits, ie 5 or 8 digits.
Matches
to 9373H|tO 0934|TO 6266|To 0937|to 9347.|to 9837|to 8933 |to 8937
Non-Matches
to 82799
Author Rating: Not yet rated. fuller namer
Title Test Details Amount of money
Expression
^[-+]?\d+([.,]\d{0,2}){0,1}$
Description
matches a number with maximum 2 digits after seperator. also american sepratar "." as german/european seperator "," is accepted
Matches
123.45 -123,45 0,12 1234567,78
Non-Matches
1.234 ,43 1,234,567.32 - 123,
Author Rating: Not yet rated. Martin Hauck
Title Test Details Matching 3 Digits Number :0..999: ^([0-9]|[1-9][0-9]|[1-9][0-9][0-9])$
Expression
^([0-9]|[1-9][0-9]|[1-9][0-9][0-9])$
Description
Matching 3 Digits Number :0..999: ^([0-9]|[1-9][0-9]|[1-9][0-9][0-9])$ 0 to 999
Matches
0,152,356,999
Non-Matches
-0,12553,-56
Author Rating: Not yet rated. Bheemsen Singh
Title Test Details Danish phone number
Expression
((^\d{8})|(^\d{2}[ ]\d{2}[ ]\d{2}[ ]\d{2})|(^\d{4}[ ]\d{4}))$
Description
A Danish phone number can be written in three ways (if you don't include the country code +45). Either one block of 8 digits or two blocks of four digits or four blocks of two digits.
Matches
12345678 | 1234 5678 | 12 34 56 78
Non-Matches
123 456 78 | 12 3456 78 | 1 23 45 67 8 | 55 ab 66 xy
Author Rating: The rating for this expression. Liza Overgaard
Title Test Details Currency validation
Expression
^(?!0\d)([0-9]{1,}(,[0-9]{2}))$
Description
No leading zeroes. Must have 2 digits after the decimal comma ','
Matches
0,00 | 12,34 | 2014,08
Non-Matches
00,00 | 12 | 12,3 |12,345 | 08,20
Author Rating: The rating for this expression. Alexander Ivanov
Title Test Details Russian Phone Validate
Expression
^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$
Description
Focused on the Russian mobile + city code of 3 digits (eg, Russia). +79261234567 89261234567 79261234567 +7 926 123 45 67 8(926)123-45-67 123-45-67 9261234567 79261234567 (495)1234567 (495) 123 45 67 89261234567 8-926-123-45-67 8 927 1234 234 8 927 12 12 888 8 927 12 555 12 8 927 123 8 123
Matches
+79261234567 | 8(926)123-45-67 | +7 926 123 45 67
Non-Matches
+9 000 000 00 00
Author Rating: Not yet rated. Nick Pinevich
Title Test Details Brazilian Phone (mobile or not)
Expression
^((\(([1-9]{2})\))(\s)?(\.)?(\-)?([0-9]{0,1})?([0-9]{4})(\s)?(\.)?(\-)?([0-9]{4})|(([1-9]{2}))(\s)?(\.)?(\-)?([0-9]{0,1})?([0-9]{4})(\s)?(\.)?(\-)?([0-9]{4}))$
Description
This expression allows Brazilian phone numbers as they have 4 or 5 prefix digits and with/without regional code. Not perfect but simplifies. Also allows space or dot or hyphen as optional separator in the number as parenthesis in regional code.
Matches
(13)98145-5566 | (11)8854-3236 | (11) 8854-3236 | (11).8854.3236 | (11)-8854-3236 | 1177854425 | 11.5642-3115
Non-Matches
(13654854 | 01 9854-4253 | 11.456758-525
Author Rating: The rating for this expression. José Luís de Oliveira Santos
Title Test Details Date regex
Expression
^((19[0-9][0-9])|(20[0-1][0-5]))\-((0?[1-9])|(1[0-2]))\-((0?[1-9])|([1-2][0-9])|(3[0-1]))$
Description
Year, month and day with dashes.Year starts from 1900 to 2015 and must be 4 digits.
Matches
2012-05-21 | 1960-12-14 | 1910-5-3
Non-Matches
2011/5/21 | 60-12-14 | 2021-5-3
Author Rating: The rating for this expression. Soroush gholamzadeh
Title Test Details jalali date
Expression
^\d{4}\/\d{1,2}\/\d{1,2}$
Description
This regular expressions matches jalali dates of the form YYYY/XX/XX where XX can be 1 or 2 digits long and YYYY is always 4 digits long.
Matches
1394/01/3 | 1365/12/31 | 1397/02/01
Non-Matches
1394/1/555 | 139/1/4 | 1/11/1394
Author Rating: Not yet rated. davood dehghan
Title Test Details HMRC Unique Tax Ref/ Corporation Tax Ref
Expression
[0-9]{5}\s?[0-9]{5}
Description
Basic UTR and CRT formats, 10 digits however are often written with an optional space after 1st 5
Matches
1234567890|12345 67890
Non-Matches
123 4567890|A123456789
Author Rating: Not yet rated. PJWhitfield
Title Test Details Accounts Office Reference
Expression
[0-9]{3}P[A-Z][0-9]{7}[0-9X]
Description
HMRC Accounts Office Reference (AORef) in format 3digits, the letter P and another letter followed by 7 digits and either an 8th digit or letter X
Matches
123PA12345678|451PW1234523X
Non-Matches
A01PA12345678|123RA1234567X
Author Rating: Not yet rated. PJWhitfield
Title Test Details UK Boat Port Registrations
Expression
(([A-HJ-PRSTW]|A[BDHR]|BCK|B[ADEFHK-ORSUW]|BRD|C[AEFHKLNOSTY]|D[AEHKORS]|F[DEHRY]|G[HKNRUWY]|H[HL]|I[EH]|INS|KY|L[AHIKLNORTY]|M[EHLNRT]|N[ENT]|OB|P[DEHLNTWZ]|R[NORXY]|S[ACDEHMNORSTUY]|SSS|T[HNOT]|UL|W[ADHIKNOTY]|YH)[1-9][0-9]{0,2})|([1-9][0-9]{0,2}([A-HJ-PRSTW]|A[BDHR]|BCK|B[ADEFHK-ORSUW]|BRD|C[AEFHKLNOSTY]|D[AEHKORS]|F[DEHRY]|G[HKNRUWY]|H[HL]|I[EH]|INS|KY|L[AHIKLNORTY]|M[EHLNRT]|N[ENT]|OB|P[DEHLNTWZ]|R[NORXY]|S[ACDEHMNORSTUY]|SSS|T[HNOT]|UL|W[ADHIKNOTY]|YH))
Description
Maritime vessels are required to be registered in the port nearest to them. Each boat is registered with a 2 Alpha and between 1 and 3 digits reference denoting the port and number. Large boats have the alpha first while small vessels start with the digits
Matches
BH156 | AA12 | CA52 | 172FD
Non-Matches
B156H | AC12 | CB52 | 1172FD
Author Rating: Not yet rated. PJWhitfield
Change page:   |    Displaying page 12 of 13 pages; Items 221 to 240

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials