regsub(n) Tcl Built-In Commands regsub(n)
__________________________________________________________________________________________________________________________________________________
NAME
regsub - Perform substitutions based on regular expression pattern matching
SYNOPSIS
regsub ?switches? exp string subSpec ?varName?
_________________________________________________________________
DESCRIPTION
This command matches the regular expression exp against string, and either copies string to the variable whose name is given by varName or
returns string if varName is not present. (Regular expression matching is described in the re_syntax reference page.) If there is a
match, then while copying string to varName (or to the result of this command if varName is not present) the portion of string that matched
exp is replaced with subSpec. If subSpec contains a "&" or "