Skip Menu |

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

Report information
The Basics
Id: 6940
Status: resolved
Priority: 0/
Queue: Regexp-Common

People
Owner: Nobody in particular
Requestors: RandyS [...] ThePierianSpring.org
Cc:
AdminCc:

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



Subject: lone . (decimal) considered a match for $RE{num}{real}
perl -MRegexp::Common=number -e 'print "oops\n" if "." =~ /$RE{num}{real}/' This was pointed out to me by Gunnar Hjalmarsson in a thread on <beginners@perl.org> where I was trying to convince them of the virtues of using Regexp::Common over hand-crafting their own solutions. Here is a slightly perlified version from Jeffrey Friedl's book which I also posted to that thread which also solves the original issue without the oops: /-?(?:\d+(?:\.\d*)?|\.\d+)/
Fixed in version 2011041601.