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

Re: the variable-length lookbehind experiment

Thread Previous | Thread Next
June 20, 2021 12:02
Re: the variable-length lookbehind experiment
Message ID:
"Ricardo Signes" <> wrote:
>variable-length lookbehind:
>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 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.

(?<=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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About