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

Please support RegExLib Sponsors

Sponsors

Expressions by User

Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20
Title Test Details Accurate IP address verification
Expression
((0|1[0-9]{0,2}|2[0-9]?|2[0-4][0-9]|25[0-5]|[3-9][0-9]?)\.){3}(0|1[0-9]{0,2}|2[0-9]?|2[0-4][0-9]|25[0-5]|[3-9][0-9]?)
Description
Accurate IP address verification... Each numeric part of an IP address must be between 0 and 255. All patterns I have seen on the net cover this range but they allow leading zeros. The valid cases are: * 0 * 1, 10-19 and 100-199 aka 1[0-9]{0,2} * 2 and 20-29 aka 2[0-9]? * 200-249 aka 2[0-4][0-9] * 250-255 aka 25[0-5] * 3-9 and 30-99 aka [3-9][0-9]?
Matches
10.0.0.0 | 195.167.1.119 | 255.255.255.255
Non-Matches
010.0.0.0 | 195.167.01.119 | 256.20.55.23
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details Australian postal code verification
Expression
(0[289][0-9]{2})|([1345689][0-9]{3})|(2[0-8][0-9]{2})|(290[0-9])|(291[0-4])|(7[0-4][0-9]{2})|(7[8-9][0-9]{2})
Description
Accurate Australian postal code verification. Australia has 4-digit numeric postal codes with the following state based specific ranges. ACT: 0200-0299 and 2600-2639. NSW: 1000-1999, 2000-2599 and 2640-2914. NT: 0900-0999 and 0800-0899. QLD: 9000-9999 and 4000-4999. SA: 5000-5999. TAS: 7800-7999 and 7000-7499. VIC: 8000-8999 and 3000-3999. WA: 6800-6999 and 6000-6799.
Matches
0200 | 7312 | 2415
Non-Matches
0300 | 7612 | 2915
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details Canadian postal code format verification
Expression
([ABCEGHJKLMNPRSTVXY][0-9][ABCEGHJKLMNPRSTVWXYZ])\ ?([0-9][ABCEGHJKLMNPRSTVWXYZ][0-9])
Description
Accurate Canadian postal code format verification. The format of a Canadian postal code is LDL DLD where L are alpha characters and D are numeric digits. But there are some exceptions. The letters D, F, I, O, Q and U never appear in a postal code because of their visual similarity to 0, E, 1, 0, 0, and V respectively. In addition to avoiding the six "forbidden" letters W and Z also do not appear as the first letter of a postal code (at least not at present).
Matches
M1R 4B0 | L0R 1B1 | L0R1B9
Non-Matches
W1R 4B0 | L0R 1D1 | LOR1B9
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details German postal code verification (UPDATED)
Expression
((0[13-7]|1[1235789]|[257][0-9]|3[0-35-9]|4[0124-9]|6[013-79]|8[0124-9]|9[0-5789])[0-9]{3}|10([2-9][0-9]{2}|1([2-9][0-9]|11[5-9]))|14([01][0-9]{2}|715))
Description
Accurate German postal code verification. Germany has 5-digit numeric postal codes. The expression evaluates a postal code within state based specific ranges.
Matches
01125
Non-Matches
34125
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details UK postal code format verification
Expression
(([A-Z]{1,2}[0-9][0-9A-Z]?)\ ([0-9][A-Z]{2}))|(GIR\ 0AA)
Description
Accurate UK postal code format verification. UK postal codes have two parts. The right part is formatted as DLL (L:letter D:digit) and the left part has six alternative formats: LD, LDL, LDD, LLD, LLDL and LLDD. There is only one exception to these formats: GIR 0AA.
Matches
M2 5BQ | EC1A 1HQ | GIR 0AA
Non-Matches
M2 BQ5 | E31A 1HQ | GIR0AA
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (DE, EE, EL, PT)
Expression
((EE|EL|DE|PT)-?)?[0-9]{9}
Description
VAT Numbers format verification (Estonia, Germany, Greece, Portugal) with support for optional member state definition.
Matches
DE123456789 | 224466880
Non-Matches
DE12345678 | 22446688B
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (FI, HU, LU, MT, SI)
Expression
((FI|HU|LU|MT|SI)-?)?[0-9]{8}
Description
VAT Numbers format verification (Finland, Hungary, Luxemburg, Malta, Slovenia) with support for optional member state definition.
Matches
HU12345678 | 22446688
Non-Matches
HU1234567 | 224466BB
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (PL, SK)
Expression
((PL|SK)-?)?[0-9]{10}
Description
VAT Numbers format verification (Poland, Slovakia) with support for optional member state definition.
Matches
PL1234567890 | 1234567890
Non-Matches
PL123456789 | 123456789O
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (IT, LV)
Expression
((IT|LV)-?)?[0-9]{11}
Description
VAT Numbers format verification (Italy, Latvia) with support for optional member state definition.
Matches
IT12345678901 | 12345678901
Non-Matches
IT1234567890 | 1234567890I
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (SE)
Expression
(SE-?)?[0-9]{12}
Description
VAT Numbers format verification (Sweden) with support for optional member state definition.
Matches
SE123456789012 | 123456789012
Non-Matches
SE12345678901 | 123456789O12
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (BE)
Expression
(BE-?)?0?[0-9]{9}
Description
VAT Numbers format verification (Belgium) with support for optional member state definition.
Matches
BE123456789 | 0123456789
Non-Matches
BE12345678 | O123456789
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (CY)
Expression
(CY-?)?[0-9]{8}[A-Z]
Description
VAT Numbers format verification (Cyprus) with support for optional member state definition.
Matches
CY12345678A | 12345678A
Non-Matches
CY1234567A | 123456789
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (CZ)
Expression
(CZ-?)?[0-9]{8,10}
Description
VAT Numbers format verification (Czech Republic) with support for optional member state definition.
Matches
CZ12345678 | 1234567890
Non-Matches
CZ1234567 | 12345678901
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (DK)
Expression
(DK-?)?([0-9]{2}\ ?){3}[0-9]{2}
Description
VAT Numbers format verification (Denmark) with support for optional member state definition.
Matches
DK11 22 33 44
Non-Matches
DK11223344
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (ES)
Expression
(ES-?)?([0-9A-Z][0-9]{7}[A-Z])|([A-Z][0-9]{7}[0-9A-Z])
Description
VAT Numbers format verification (Spain) with support for optional member state definition.
Matches
ES01234567A | A12345678
Non-Matches
ES012345678 | AB2345678
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (FR)
Expression
(FR-?)?[0-9A-Z]{2}\ ?[0-9]{9}
Description
VAT Numbers format verification (France) with support for optional member state definition.
Matches
FRAB 123456789 | L7 123456789
Non-Matches
FRAB123456789 | L7 L23456789
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (GB)
Expression
(GB-?)?([1-9][0-9]{2}\ ?[0-9]{4}\ ?[0-9]{2})|([1-9][0-9]{2}\ ?[0-9]{4}\ ?[0-9]{2}\ ?[0-9]{3})|((GD|HA)[0-9]{3})
Description
VAT Numbers format verification (United Kingdom) with support for optional member state definition.
Matches
GB123 1234 12 | GBGD123 | 123 1234 12 123
Non-Matches
GB123123412 | GBGD1234 | 023 1234 12 123
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (IE)
Expression
(IE-?)?[0-9][0-9A-Z\+\*][0-9]{5}[A-Z]
Description
VAT Numbers format verification (Ireland) with support for optional member state definition.
Matches
IE4*12345Z | 0012345K
Non-Matches
IE4-12345Z | 00123456
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (LT)
Expression
(LT-?)?([0-9]{9}|[0-9]{12})
Description
VAT Numbers format verification (Lithuania) with support for optional member state definition.
Matches
LT123456789 | 123456789012
Non-Matches
LX123456789 | 123466789O12
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details VAT Numbers format verification (NL)
Expression
(NL-?)?[0-9]{9}B[0-9]{2}
Description
VAT Numbers format verification (The Netherlands) with support for optional member state definition.
Matches
NL123456789B12
Non-Matches
NL123456789012
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details Valid Base64 string
Expression
(([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?){1}
Description
The expression evaluates a Base64 string as a sequence of 4-byte blocks with a possible tail of 2 or 3-byte block with valid padding.
Matches
AAAAAA==
Non-Matches
AAAAAA
Author Rating: Not yet rated. Vassilis Petroulias
Title Test Details HTML encoded characters as dec or hex values
Expression
&#([0-9]{1,5}|x[0-9a-fA-F]{1,4});
Description
Find all html encoded characters as dec &#[0-9]{1,5}; or hex &#x[0-9a-fA-F]{1,4}; values. Remember to remove "amp;" which is used for making this post possible.
Matches
  |  
Non-Matches
 
Author Rating: Not yet rated. Vassilis Petroulias
Title Test Details US and Canada Phone numbers (all variations)
Expression
((\+?1)(\ \.-)?)?\([2-9][0-9]{2}|\([2-9][0-9]{2}\))(\ \.-)?[0-9]{3}(\ \.-)?[0-9]{4}
Description
US and Canada phones in any usual variation (area code in parenthesis, spaces or dots) including the international notation +1
Matches
+1 212 555 6666 | (212) 555 6666 | 212-555-666 | 212 5556666
Non-Matches
212 555 666
Author Rating: Not yet rated. Vassilis Petroulias
Title Test Details Month names (english)
Expression
(Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|(Nov|Dec)(ember)?)
Description
The expression matches any month name (english) in short or full style. Use it with case insensitive mode in your date matching expressions.
Matches
Jan | April
Non-Matches
Febr
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details Weekday names (english)
Expression
(Mo(n(day)?)?|Tu(e(sday)?)?|We(d(nesday)?)?|Th(u(rsday)?)?|Fr(i(day)?)?|Sa(t(urday)?)?|Su(n(day)?)?)
Description
The expression matches any weekday name (english) in short (2 or 3 characters) or full style. Use it with case insensitive mode in your date matching expressions.
Matches
Mo | Sun
Non-Matches
Any
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details US (5 or 9 digits) Zip Codes with grouping
Expression
(?<group5>[0-9]{5})-?(?<group4>[0-9]{4})?
Description
Match 5-digit or 9-digit US zip codes with grouped results. Remember to replace < with open tag char and > with close tag char
Matches
12345 | 12345-6789 | 123456789
Non-Matches
12345 6789
Author Rating: Not yet rated. Vassilis Petroulias
Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20

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