![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.tcl archiveRe: regsub replacing the last off
From: Bryan Oakley <oakley@bardo.clearlight.com>
Date: Wed Dec 28 2005 - 18:58:48 CET
Andre Arpin wrote:
Your pattern matches that final "bc" (b followed by zero or more
From the man page:
"...the portion of string that matched exp is replaced..."
Since "bc" is what matched (which is different from what is captured),
>
Capture the parts you don't want replaced in the matching pattern, and
regsub {b([^b]*$)} abcabcabc {x\1}
|