Code: Select all
proc subst {text} {
regsub -all -- \\\\ $text \\\\\\\\ text
regsub -all -- \\\[ $text \\\\\[ text
regsub -all -- \\\] $text \\\\\] text
regsub -all -- \\\} $text \\\\\} text
regsub -all -- \\\{ $text \\\\\{ text
regsub -all -- \\\" $text \\\\\" text
return $text
}
Thx^DooM^ wrote:Maybe if you read 'The Manual' ? you would find all the help you need.
Try this
Code: Select all
proc subst {text} { regsub -all -- \\\\ $text \\\\\\\\ text regsub -all -- \\\[ $text \\\\\[ text regsub -all -- \\\] $text \\\\\] text regsub -all -- \\\} $text \\\\\} text regsub -all -- \\\{ $text \\\\\{ text regsub -all -- \\" $text \\\\" text return $text }