Skip Menu |

This queue is for tickets about the Regexp-Common CPAN distribution.

Report information
The Basics
Id: 93679
Status: rejected
Priority: 0/
Queue: Regexp-Common

People
Owner: Nobody in particular
Requestors: DROLSKY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: IPv6 regex fails valid addresses
perl -MRegexp::Common -E 'say q{2001:0db8:0000:0000:0000::1428:57ab} =~ /^$RE{net}{IPv6}$/' This passes without the '$' anchor, but that's not very useful ;)
On Sun Mar 09 11:46:55 2014, DROLSKY wrote: Show quoted text
> perl -MRegexp::Common -E 'say q{2001:0db8:0000:0000:0000::1428:57ab} > =~ /^$RE{net}{IPv6}$/' > > This passes without the '$' anchor, but that's not very useful ;)
The regexp is intended to fail here. If you use an address with a contraction, you must contract at least two groups of hexadecimal digits. However, you example address contains seven groups, meaning you're omitted a single group. That's invalid, and hence the pattern fails to match.
Not a bug