See perlvar for @- and @+ variables.print "Matched at $-[1]\n" if $text =~ /^.*?($end1|$end2|$end3)/;
Update: and this is along the same lines as Not_a_Number's post below. sorry for the redundancy...
In reply to Re: Re: finding position of first occurence of 3 different stopping criteria
by runrig
in thread finding position of first occurence of 3 different stopping criteria
by imlou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |