Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Perl6 global regex matching

by Sathishkumar (Scribe)
on Oct 20, 2015 at 07:49 UTC ( [id://1145390]=perlquestion: print w/replies, xml ) Need Help??

Sathishkumar has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I need help of Perl6 regex matching. Please find my below Perl6 code. I unable to find global match in the string.
my $line = 'abCdes123'; $line ~~ s:P5:i:g/abc/124/; say $line; while ($line ~~ m :P5:g/^\d{2,3}/) { my $value = "$/"; say $value; say get(); }
Thanks, Sathishkumar S

Replies are listed 'Best First'.
Re: Perl6 global regex matching
by moritz (Cardinal) on Oct 20, 2015 at 10:29 UTC
Re: Perl6 global regex matching
by Corion (Patriarch) on Oct 20, 2015 at 08:04 UTC

    So what is the output of your program and what do you expect instead?

Re: Perl6 global regex matching
by Sathishkumar (Scribe) on Oct 20, 2015 at 12:28 UTC
    Hi Moritz, Thanks for your reply. Its really helpful. Thanks, Sathishkumar S

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1145390]
Approved by AppleFritter
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-26 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found