On Mar 11, 2009, at 5:03 AM, Nick Gearls wrote:
Oops, stupid ! Anyway, a real problem: Substitute s|(toreplace)|*replaced[$1]*|qitranslates "toreplace" into "*replaced[*replaced[*replaced[toreplace]*]*]*"Don't we expect the q flag to stop any replacement after the first one?
Not necessarily, no... it's not a replaceAll vs. replaceFirst flag.
