develooper Front page | perl.perl5.porters | Postings from June 2021

Re: the variable-length lookbehind experiment

Thread Previous | Thread Next
From:
hv
Date:
June 20, 2021 12:02
Subject:
Re: the variable-length lookbehind experiment
Message ID:
202106201128.15KBS0P03910@crypt.org
"Ricardo Signes" <perl.p5p@rjbs.manxome.org> wrote:
>variable-length lookbehind: https://github.com/Perl/perl5/issues/18756
>
>This feature was added as an experiment in v5.30.0 and has, as far as I know has been unchanged and has worked as expected.  *I propose we mark this feature a success**. *
>
>I am looking for two key opinions here:
> * Karl Williamson's
> * everybody else's consensus

In the ticket you call it an "experimental feature", but I think "experiment"
is more accurate - there's nothing in feature.pm for it.

I think it is worth asking whether anyone has been using it: I don't recall
any mention here of positive or negative experiences with it. I see that a
handful of simple tests were added in 2abbd513b87 (below, in t/re/re_tests),
but I don't know if more comprehensive tests were added later.

Hugo
---
(?<=af?)b      ab      y       $&      b
(?<=a(?:fo)?)b cb      n       -       -
(?<=a(?:foo)?)b        b       n       -       -
(?<!c(?:foob)?)b       ab      y       $&      b
(?<!c(?:fooba)?)b      cb      n       -       -
(?<!c(?:foobar)?)b     b       y       -       -
(?<!c(?:foobarb)?)b    b       y       $&      b
(?<![cd]e{0,254})b     dbcb    n       -       -
(?<![cd]{1,2})[ab]     dbaacb  y       $&      a
(?=xy(?<=(aaxyz?)))    ..aaxy..        y       $1      aaxy
/(?iu)(?<=\xdf)hbase/  sshbase y       $&      hbase


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About