Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: regex bug in perl 5.8.7

by diotalevi (Canon)
on May 26, 2007 at 00:12 UTC ( #617633=note: print w/ replies, xml ) Need Help??

in reply to Re^2: regex bug in perl 5.8.7
in thread regex bug in perl 5.8.7

In the future, you might want to use the (?{...}) form instead since that has no implications for compiling and interpolating another regexp.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Comment on Re^3: regex bug in perl 5.8.7
Replies are listed 'Best First'.
Re^4: regex bug in perl 5.8.7
by imp (Priest) on May 26, 2007 at 04:31 UTC
    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:

    my $negative = qr[ (??{ /^<3/ ? qr/\A\z/ : qr//; }) ]x;
    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://617633]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2016-02-14 13:03 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (470 votes), past polls