Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Perl6 global regex matching

by Sathishkumar (Scribe)
on Oct 20, 2015 at 07:49 UTC ( #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 (Pope) 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
Node Status?
node history
Node Type: perlquestion [id://1145390]
Approved by AppleFritter
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-10-19 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (257 votes). Check out past polls.

    Notices?