On 20 Feb 2005 22:22:46 -0000, via RT Mike Rosulek <[EMAIL PROTECTED]> wrote: > # New Ticket Created by Mike Rosulek > # Please include the string: [perl #34195] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34195 > > > This is a bug report for perl from [EMAIL PROTECTED], > generated with the help of perlbug 1.35 running under perl v5.8.4. > > ----------------------------------------------------------------- > [Please enter your report here] > > ## this seems to be related to Ticket #23030 > > ## /^(aa|aaaa)*$/ is equivalent to /^(aa)*$/ > ## they both match strings of a's of even length > > ## this works: > > if ( ("a" x 19) !~ /^(aa)*$/ ) { > print "19 a's don't match /^(aa)*\$/\n"; > } > > ## and so does this: > > if ( ("a" x 19) !~ /^(aa|aaaa)*$/ ) { > print "19 a's don't match /^(aa|aaaa)*\$/\n"; > } > > ## thus ("a" x 20) should match /^(a*?)(?!(aa|aaaa)*$)/ > ## with $1 = "a", but it doesn't!
Yeah I agree. Blead perl shows this problem too. It looks like it has to do with caching from the debug output: "Detected a super-linear match, switching on caching..." Is reported just a bit before the incorrect fail. yves
