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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 5
Title Test Details Signed Integer
Expression
^[+-]?[0-9]+$
Description
Single- or multi-digit signed Integer.
Matches
12 | -2 | +3213
Non-Matches
abc | @41 | 43.12
Author Rating: Not yet rated. jteeuwen
Title Test Details Decimal Number
Expression
^[+-]?\d*(([,.]\d{3})+)?([,.]\d+)?([eE][+-]?\d+)?$
Description
Matches any integer or decimal number with either dot (.) or comma (,) as decimal- and thousands-separator. Also accepts Scientific notation.
Matches
-4,233.2832e12 | +232 | -0.12e-5
Non-Matches
abc | @41 | 0x423
Author Rating: Not yet rated. jteeuwen
Title Test Details ipv4 IP Address
Expression
^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$
Description
This matches any valid IPV4 IP Address. It includes 0-255 range checks since none of the IP components may exceed 255.
Matches
97.67.44.20 | 199.154.37.214 | 127.0.0.1
Non-Matches
63.125.94.287 | 140.370.a.187 | 94.923.1
Author Rating: The rating for this expression. jteeuwen
Title Test Details Hexadecimal Colour
Expression
^#?(([a-fA-F0-9]{3}){1,2})$
Description
Matches any valid 3 or 6 digit hexadecimal colour value.
Matches
#ff9900 | #abc | #92fea5
Non-Matches
ab | #92a2 | 32z
Author Rating: Not yet rated. jteeuwen
Title Test Details IPv6 Address
Expression
(^\d{20}$)|(^((:[a-fA-F0-9]{1,4}){6}|::)ffff:(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$)|(^((:[a-fA-F0-9]{1,4}){6}|::)ffff(:[a-fA-F0-9]{1,4}){2}$)|(^([a-fA-F0-9]{1,4}) (:[a-fA-F0-9]{1,4}){7}$)|(^:(:[a-fA-F0-9]{1,4}(::)?){1,6}$)|(^((::)?[a-fA-F0-9]{1,4}:){1,6}:$)|(^::$)
Description
This matches all valid forms of an IPv6 address. Including the compatibility form used to map IPv4 addresses. As well as the base-85 encoded integer form. It takes care of value range checking on the ipv4 part (components cannot exceed 0-255). This has been tested quite thoroughly, but considering the complexity and possibilities in the formation of an IPv6 address, matching errors are not guaranteed to be absent.
Matches
::5:aef1:ffff | ::ffff:240.65.238.22 | 0:0:0:0:0:0:0:1
Non-Matches
79250:9a0: | 8 | 91cf91d3da9
Author Rating: Not yet rated. jteeuwen
   Displaying page 1 of 1 pages; Items 1 to 5

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