in reply to Re: Find initial position of match iin regexp with variable span
in thread Find initial position of match iin regexp with variable span
Sorr for the code that doesnn't compile, I just build it on the run around the Regexp. Anyway, I found the solution. If:
my $position = pos($text);
finds the matching position at the END of the pattern
my $position = ($-[0]);
finds the matching position at the BEGINNING of the pattern.
|
|---|