Title |
Test
Find
IPv4, udp/norm protocol with port
|
Expression |
^(udp|norm)://(?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?(?=\.?\d)\.)){4}:\d{1,6}$ |
Description |
Based on ip regex listed in source. Expanded to require udp:// or norm:// protocol at the start and :12345 port number at the end (1-5 digits).
Written to answer a forum question.
Current limitations - only allows lowercase protocol names and doesn't block ports that start with 0. |
Matches |
norm://125.24.65.11:80 | udp://125.24.65.11:80 |
Non-Matches |
125.24.65.11:80 | norm://125.24.65.11 | www.NotAnIp.com |
Author |
Rating:
Not yet rated.
Matthew Harris
|
Source |
http://regexlib.com/REDetails.aspx?regexp_id=547 |
Your Rating |
|