2009-07-04

Regular expression substitutions in Tcl

Just a quick note to self on how to use Tcl’s regsub command:

% regsub -all {pattern} "input string containing pattern" "replacement" target
1
% puts $target
input string containing replacement