in reply to Re^3: regex bug in perl 5.8.7
in thread regex bug in perl 5.8.7
The regex that originally triggered the segfault was an attempt at a joke that used a modified version of the regex I wrote in this node.
The joke was that someone in an irc channel at work said "<3", and someone else asked what the opposite of "<3" was. My response was qr[(??{/^<3/?qr/\A\z/:qr//;})]
Which is this when written in a legible manner:
Which segfaulted, but only when the text being searched started with '<3'. After a little exploration I found the minimal regex that still segfaulted, and posted about it.my $negative = qr[ (??{ /^<3/ ? qr/\A\z/ : qr//; }) ]x;
In Section
Seekers of Perl Wisdom