Displaying page
of
pages;
Items to
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:
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:
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:
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:
jteeuwen
|
Displaying page
of
pages;
Items to