Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
\b(([01]?\d?\d|2[0-4]\d|25[0-5])\.){3}([01]?\d?\d|2[0-4]\d|25[0-5])\b
|
Description |
Most Concise RegExp for matching Decimal IPs. If nothing else, it'll make your code easier to read. (And I know that \d?\d is \d{1,2} but that's 2 extra characters.)
--Update: darkone noticed 8 characters could be shaved down. I've edited it to reflect this. Thanks, darkone!
|
Matches |
217.6.9.89 | 0.0.0.0 | 255.255.255.255
|
Non-Matches |
256.0.0.0 | 0978.3.3.3 | 65.4t.54.3
|
Author |
Rating:
Sean Schricker
|
Displaying page
of
pages;
Items to