in reply to Re^7: Regex::Reverse tricky test cases
in thread Regex::Reverse tricky test cases

I think I would reverse it as qr/(.*?)(\d+)(A)(?=\2)/. But I'm not at all sure how to make a rule I could apply to a YAPE::Regex tree.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^9: Regex::Reverse tricky test cases
by dragonchild (Archbishop) on May 17, 2005 at 17:25 UTC
    I don't know about the YAPE::Regex tree, but the rule seems to be: If you have a negative lookbehind and a backreference to it, it stays in the same position, but becomes a positive lookahead on the backreference to its mirror'ed element.

    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"