There is a perl 5 compatible option you can pass to perl 6 regexps. Not sure its 100% and I think it's based on perl5.10 but it could be useful if you wanted to gradually port perl 5 to perl 6.
S On Fri, 11 May 2018 at 05:49, ToddAndMargo <toddandma...@zoho.com> wrote: > On 05/10/2018 09:26 PM, ToddAndMargo wrote: > > On 05/10/2018 09:13 PM, ToddAndMargo wrote: > >>>> On Thu, May 10, 2018 at 11:56 PM, ToddAndMargo > >>>> <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote: > >>>> > >>>> Hi All, > >>>> > >>>> I am trying to convert this over from Perl5: > >>>> > >>>> P5: > >>>> $dir_entry =~ /.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*${Extension}/; > >>>> > >>>> P6: > >>>> $dir_entry ~~ m/.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*{$Extension}/; > >>>> > >>>> > >>>> $ perl6 -c GetUpdates.pl6 > >>>> ===SORRY!=== > >>>> Unsupported use of {N,M} as general quantifier; in Perl 6 please > >>>> use > >>>> ** N..M (or ** N..*) > >>>> at /home/linuxutil/GetUpdates.pl6:425 > >>>> ------> $dir_entry ~~ > >>>> m/.*?(\d{1,4}\D\d{1,4}\D\d{1,4}).*{$Extension}/; > >>>> > >>>> > >>>> What am I doing wrong? > >>>> > >>>> > >>>> Many thanks, > >>>> -T > >>>> > >> > >> On 05/10/2018 09:11 PM, Brandon Allbery wrote: > >>> Pretty much what it's telling you. Instead of the numbers in braces, > >>> it's the ** operator with a range after it: \d ** 1..4 > >>> (Remember that spaces do nothing in a P6 regex, so you can use them > >>> for readability or to separate the range from what follows, etc.) > >>> > >> > >> The light bulb is not firing. How do I change {1.4} > >> over to p6? > > > > > > Light bulb finally went off: > > > > $dir_entry ~~ m/.*?(\d**1..4 \D \d**1..4 \D \d**1..4).*{$Extension}/; > > > > Took a bit > > > > > > > Gee Wiz. I am only up to line 567 of my big p5 to p6 change over. > It is going to be a long time getting to line 5833. > :'( > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Computers are like air conditioners. > They malfunction when you open windows > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Steve Mynott <steve.myn...@gmail.com> cv25519/ECF8B611205B447E091246AF959E3D6197190DD5