Welcome to the Monastery | |
PerlMonks |
Re^2: How to enforce match priority irrespective of string positionby Polyglot (Chaplain) |
on Mar 08, 2021 at 01:33 UTC ( [id://11129305]=note: print w/replies, xml ) | Need Help?? |
And that method worked! (Though I've had to restructure a bit to accommodate, as that was not in a simple substitution form.) I don't mind doing whatever is necessary to get things working, though...so thank you very much! I'll certainly upvote this when I get my next day's rations. This part seems to be the crucial bit: (?=Point|\z) (?!\1). I find this sort of syntax confusing because it always seems to me that the "Point" here should have precedence over anything coming afterward in the regex sequence, in this case the "\1" backreference. If "Point" is already detected from the forward assertion, why can it be matched again (overlapped) by this reference, even if in the negative? Well, no complaints at the moment, certainly, as at least the script is now past this hurdle. Thank you. Blessings, ~Polyglot~
In Section
Seekers of Perl Wisdom
|
|