develooper Front page | perl.perl6.users | Postings from June 2020

Re: Code assertions to spy on regexps behavior

Thread Previous | Thread Next
From:
Vadim Belman
Date:
June 15, 2020 02:43
Subject:
Re: Code assertions to spy on regexps behavior
Message ID:
A2C131F2-AC18-4FFE-B932-465405A12E38@lflat.org
It doesn't have to be an assertion. Just a code block would do the same.

Best regards,
Vadim Belman

> On Jun 14, 2020, at 8:55 PM, Joseph Brenner <doomvox@gmail.com> wrote:
> 
> $_ = "Alpha beta gamma";
>  my @matches = m:g/(a) <?{ put $0.pos }>/;


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