Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: whataboutbobw [...] gmail.com
Cc:
AdminCc:

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



Subject: Bug in Regexp::Common::number?
Date: Wed, 13 Jan 2016 10:23:54 -0500
To: bug-Regexp-Common [...] rt.cpan.org
From: Bob Wetmore <whataboutbobw [...] gmail.com>
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi (with 41 registered patches, see perl -V for more detail) $ uname -a Linux bob-B654 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ---------------------code--------------------------------- #!/usr/bin/perl -w use 5.018; use Regexp::Common qw(number); my $string = "The integer is 1234567"; say "string is: $string"; if ( $string =~ /$RE{num}{int}{-sep=>',?'}{-keep}/ ) { print "Matched: |$`<$&>$'|\n"; say "\$1 = $1"; } Show quoted text
-----------------------output------------------------------ string is: The integer is 1234567 Matched: |The integer is <123456>7| $1 = 123456 -------------------------------------------------------------------- Is this a bug? Bob Wetmore Arlington, VA
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #111152] Bug in Regexp::Common::number?
Date: Wed, 13 Jan 2016 16:44:20 +0100
To: Bob Wetmore via RT <bug-Regexp-Common [...] rt.cpan.org>
From: Abigail <abigail [...] abigail.be>
On Wed, Jan 13, 2016 at 10:24:07AM -0500, Bob Wetmore via RT wrote: Show quoted text
> Wed Jan 13 10:24:05 2016: Request 111152 was acted upon. > Transaction: Ticket created by whataboutbobw@gmail.com > Queue: Regexp-Common > Subject: Bug in Regexp::Common::number? > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: whataboutbobw@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=111152 > > > > This is perl 5, version 18, subversion 2 (v5.18.2) built for > x86_64-linux-gnu-thread-multi > (with 41 registered patches, see perl -V for more detail) > > $ uname -a > Linux bob-B654 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC > 2015 x86_64 x86_64 x86_64 GNU/Linux > > ---------------------code--------------------------------- > #!/usr/bin/perl -w > use 5.018; > use Regexp::Common qw(number); > > my $string = "The integer is 1234567"; > say "string is: $string"; > if ( $string =~ /$RE{num}{int}{-sep=>',?'}{-keep}/ ) { > print "Matched: |$`<$&>$'|\n"; > say "\$1 = $1"; > } > > -----------------------output------------------------------ > > string is: The integer is 1234567 > Matched: |The integer is <123456>7| > $1 = 123456 > > -------------------------------------------------------------------- > > Is this a bug?
No. Use of a separator means the digits are grouped. Unless otherwise specified, the group size is 3, (but the first group may be shorter). The pattern correctly matches the "123456" two groups of digits of length 3, separated by an optional comma. Regards, Abigail
Not a bug.
Not a bug.
Not a bug.