in reply to Re:perl indication of end of string already matched
in thread perl indication of end of string already matched
This if statement is true whether or not the previous regex matched $. And the regex engine will only match $ once. How does the regex engine know that it matched $? And can I get access to that information? I prefer to not call the regex engine again.
Using pos == length is sufficient. I was hoping there was a simpler call, something like pos() but for identifying whether $ was already matched. That would allow me to avoid two calls (length and pos) and instead call one function (perhaps eos($str)). I'm very sensitive to performance during parsing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl indication of end of string already matched
by AnomalousMonk (Archbishop) on Jun 08, 2020 at 19:43 UTC | |
by nachumk (Initiate) on Jun 08, 2020 at 21:58 UTC | |
by haukex (Archbishop) on Jun 08, 2020 at 22:37 UTC | |
by AnomalousMonk (Archbishop) on Jun 09, 2020 at 00:40 UTC | |
by haukex (Archbishop) on Jun 09, 2020 at 08:29 UTC | |
|
Re^3: perl indication of end of string already matched
by rsFalse (Chaplain) on Jun 16, 2020 at 11:31 UTC |