The caller can specify to only replace the first two matches or the last three matches or anything.
By "or anything", do you mean that it should be possible to replace a substring that's somewhere in the middle, but not anchored at either end? My understanding of the code and discussion so far is that any sequence of substring replacements must be anchored to an end of the string, but "or anything" makes me wonder. If you have a counterexample, please post it as a test case.
Give a man a fish: <%-{-{-{-<
In reply to Re^3: 1000000th question about regex lol (updated)
by AnomalousMonk
in thread 1000000th question about regex lol
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |