Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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?
[Jenda]: The apparent design principle of Perl6 operators was "Let's confuse 'em dudes." Whose braindead idea was this particular operator and the three hundred around it?
[liz]: ^10 is just a short way of saying 0..^10, which is a short way of saying 0..9
[liz]: ^N is a very common idiom in Perl 6 to indicate "N times"

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2018-07-16 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (344 votes). Check out past polls.

    Notices?