diff options
Diffstat (limited to 'doc/regsub.n')
-rw-r--r-- | doc/regsub.n | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/regsub.n b/doc/regsub.n index 1d436a3..e6738ce 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.11 2004/09/01 09:50:45 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.12 2004/10/27 14:24:37 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -118,15 +118,15 @@ of regular expressions. Replace (in the string in variable \fIstring\fR) every instance of \fBfoo\fR which is a word by itself with \fBbar\fR: .CS -regsub -all {\e<foo\e>} $string bar string +\fBregsub\fR -all {\e<foo\e>} $string bar string .CE - +.PP Insert double-quotes around the first instance of the word \fBinteresting\fR, however it is capitalised. .CS -regsub -nocase {\e<interesting\e>} $string {"&"} string +\fBregsub\fR -nocase {\e<interesting\e>} $string {"&"} string .CE - +.PP Convert all non-ASCII and Tcl-significant characters into \eu escape sequences by using \fBregsub\fR and \fBsubst\fR in combination: .CS @@ -138,7 +138,7 @@ set substitution {[format \e\e\e\eu%04x [scan "\e\e&" %c]]} # Now we apply the substitution to get a subst-string that # will perform the computational parts of the conversion. -set quoted [subst [regsub -all $RE $string $substitution]] +set quoted [subst [\fBregsub\fR -all $RE $string $substitution]] .CE .SH "SEE ALSO" |