Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: position of first matching regex

by GrandFather (Saint)
on May 16, 2014 at 23:52 UTC ( [id://1086406]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
        
        print "Found $1 in '$str' at index $cpos. Overall match started at
    + $mpos\n";
    }
    
  2. or download this
    Found 1 in '1 2 3' at index 0. Overall match started at 0
    Found 3 in ' a3 b2 c1' at index 2. Overall match started at 1
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found