Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: frame shift in Perl string matching

by AnomalousMonk (Canon)
on Oct 09, 2012 at 07:12 UTC ( #997939=note: print w/replies, xml ) Need Help??


in reply to frame shift in Perl string matching

And if you want to capture the matches:

>perl -wMstrict -le "my $s = 'PppP'; ;; my $search = qr{ (?i) pp }xms; my $count = my @captures = $s =~ m{ (?= ($search)) }xmsg; ;; print qq{found $count: (@captures)}; " found 3: (Pp pp pP)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997939]
help
Chatterbox?
[choroba]: I had 24.5 in January, but the last three month are below 18.5
[choroba]: and I'm trying hard not to get involved in troll feeding.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2017-04-26 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (475 votes). Check out past polls.