in reply to Re: How to capture backwards using regex?
in thread How to capture backwards using regex?

Yeah, I've played around with positive look-behind regex, and it just didn't want to work. Of course, I'm using TinyPerl 5.8, so I'm a decade or two behind. lol But surprisingly, Corion's solution works flawlessly on TinyPerl 5.8, so that's great!
  • Comment on Re^2: How to capture backwards using regex?

Replies are listed 'Best First'.
Re^3: How to capture backwards using regex?
by LanX (Saint) on Nov 10, 2024 at 17:53 UTC
    Look behind used to only work with fixed length patterns. IIRC.

    That's most likely also related to the "experimental" status of my code.

    > But surprisingly, Corion's solution works flawlessly

    Doesn't surprise me that's a very old feature, could be even Perl4.

    The idea of Pos and related stuff is very sed/awk-ish, and text processing was one of the main objectives of Perl4.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery