develooper Front page | perl.perl5.porters | Postings from July 2008

[perl #56690] Some bugs in Perl regexp (core Perl issues)

Thread Next
From:
Serge
Date:
July 8, 2008 08:01
Subject:
[perl #56690] Some bugs in Perl regexp (core Perl issues)
Message ID:
rt-3.6.HEAD-7714-1215498604-784.56690-75-0@perl.org
# New Ticket Created by  Serge 
# Please include the string:  [perl #56690]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56690 >


Hello,

 I have found some simple and unpleasant bugs in Perl regexp:

print "Match" if 'ab' =~ /^a?(?=b)b/;    # Not match, but must...

 Also you can replace ^ with \A, and ? with *.

 Here are bugs similar to the above:

print $& if 'ab' =~ /a?(?=b)b/;
print $& if 'ab' =~ /a*(?=b)b/;

 Both operators print b, but must print ab.

 Here is my bug report at ActiveState:
http://bugs.activestate.com/show_bug.cgi?id=78536

-- 
Sincerely yours,
 Serge
http://www.cronc.com
http://www.gameintellect.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About