in reply to Re^2: On the regex pattern variable to be inserted into another
in thread On the regex pattern variable to be inserted into another
It might help to know that m// and m//g are realized as separate commands in other languages.
Yes and in those languages, you can usually create an object to represent the compiled regex and then get either/both operations out of one compilation. Unfortunately perl can't do this easily.
Edit: Perl does special-case these, actually. Just not anything more elaborate like prefixing /\G$foo/ to change the anchor.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: On the regex pattern variable to be inserted into another
by LanX (Saint) on Feb 10, 2022 at 19:14 UTC | |
by LanX (Saint) on Feb 10, 2022 at 21:18 UTC | |
by NERDVANA (Priest) on Feb 11, 2022 at 13:39 UTC | |
by hv (Prior) on Feb 11, 2022 at 18:59 UTC |