There's more than one way to do things | |
PerlMonks |
Re^2: Regex boundary matchby LanX (Saint) |
on Feb 08, 2020 at 14:10 UTC ( [id://11112625]=note: print w/replies, xml ) | Need Help?? |
> Can anyone see any possible issues with that? Well, maybe not in this case, but this ([^\-]|$) will consume a position. This can become an issue if you start combining with following matches. That's why I recommended a "lookahead assertion" which is zero width.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|