There's more than one way to do things | |
PerlMonks |
Re: Identifying the position of match using regular expressionsby tinita (Parson) |
on Sep 15, 2012 at 10:59 UTC ( [id://993865]=note: print w/replies, xml ) | Need Help?? |
if you are using the /g modifier in your regex, you can use pos($string) to get the position after the match. generally you can use the @- and @+ arrays to get all match offsets and ends. see perlvar
In Section
Seekers of Perl Wisdom
|
|