summaryrefslogtreecommitdiffstats
path: root/doc/regsub.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 14:24:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 14:24:37 (GMT)
commitf2710bf0bb0c6ace5d1bc4f424b400537ffdb21c (patch)
treec19b22fbb2165682630fecbf3779e53b26c9002f /doc/regsub.n
parent4c2d0f20bfa9108949678cf49bfdc58eedc7bb93 (diff)
downloadtcl-f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c.zip
tcl-f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c.tar.gz
tcl-f2710bf0bb0c6ace5d1bc4f424b400537ffdb21c.tar.bz2
More minor doc fixes
Diffstat (limited to 'doc/regsub.n')
-rw-r--r--doc/regsub.n12
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"