Subject: | Wrong regular expression to match IP addresses. |
The following is my setup:
--------------------------
Net::IPv4Addr v0.10
Linux 2.4.16
Perl 5.6.1
The bug description:
--------------------
Module Net::IPv4Addr has the following regular expression
for matching valid IPv4 addresses:
my $ip_rgx = "\\d+\\.\\d+\\.\\d+\\.\\d+";
The problem is that this expression allows for strings like
"12.13.14.15.16". My proposed solution is
my $ip_rgx = qr/^\d+\.\d+\.\d+\.\d+$/;