develooper Front page | perl.perl6.users | Postings from August 2019

Re: How do I use ~ with Regex syntax?

Thread Previous
From:
ToddAndMargo via perl6-users
Date:
August 31, 2019 01:05
Subject:
Re: How do I use ~ with Regex syntax?
Message ID:
662c9acc-5a56-6ad4-0742-fb4fb63d532f@zoho.com
>> On Fri, Aug 30, 2019 at 8:26 PM ToddAndMargo via perl6-users 
>> <perl6-users@perl.org <mailto:perl6-users@perl.org>> wrote:
>> 
>>     Hi All,
>> 
>>     Yes, I know to just put the variable inside the quote, but
>>     I'd still like to know how to do it outside the quote;
>> 
>> 
>>     $NewPage ) ~~ s/ .*? "Full Change Log for Version " ~ $YearRev //;
>> 
>>     ------> Full Change Log for Version " ~ $YearRev⏏ //;
>>     Couldn't find terminator /
>>     at /home/linuxutil/./GetUpdates.pl6:4960
>>     ------>  s/ .*? "Full Change Log for Version " ~⏏ $YearRev //;
>>           expecting any of:
>>               /
>> 
>> 
>>     Many thanks,
>>     -T



On 8/30/19 5:51 PM, Paul Procacci wrote:
> Drop the '~'.
> 
> $b ~~ s/ .*? "In the year " $a//;
> 
> ~Paul

Hi Paul,

Oh Dude!  Now I feel dumb.  Just like I did
with the .*?.  I had already been doing it!

Thank you!

-T

Thread Previous


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