Tier 1 · Sorcerermatch
Four Octets
Match a valid IPv4 address — four numbers 0 to 255, separated by dots, and nothing else.
The hard part is not the shape, it is the range. 255 is valid and 256 is not, which no quantifier can express — you have to enumerate the ranges by their leading digits. Leading zeros are not accepted.
Your pattern0 chars · par 75
//
Flags
Start typing — tests run as you go.0 of 7 visible tests passing
Test cases
192.168.0.1must match255.255.255.255must match0.0.0.0must match256.1.1.1must not matchout of range
1.2.3must not matchonly three octets
1.2.3.4.5must not match01.2.3.4must not matchleading zero
+ 12 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.