diff options
Diffstat (limited to 'doc/regsub.n')
-rw-r--r-- | doc/regsub.n | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/doc/regsub.n b/doc/regsub.n index b895bdb..4217bd1 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -1,11 +1,12 @@ '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. +'\" Copyright (c) 2000 Scriptics Corporation. '\" '\" 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.4 1999/09/21 04:20:36 hobbs Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.5 2000/05/18 21:37:07 hobbs Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -55,6 +56,31 @@ matching range is found and substituted. If \fB\-all\fR is specified, then ``&'' and ``\e\fIn\fR'' sequences are handled for each substitution using the information from the corresponding match. +.TP 15 +\fB\-expanded\fR +Enables use of the expanded regular expression syntax where +whitespace and comments are ignored. This is the same as specifying +the \fB(?x)\fR embedded option (see METASYNTAX, below). +.TP 15 +\fB\-line\fR +Enables newline-sensitive matching. By default, newline is a +completely ordinary character with no special meaning. With this +flag, `[^' bracket expressions and `.' never match newline, `^' +matches an empty string after any newline in addition to its normal +function, and `$' matches an empty string before any newline in +addition to its normal function. This flag is equivalent to +specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the +\fB(?n)\fR embedded option (see METASYNTAX, below). +.TP 15 +\fB\-linestop\fR +Changes the behavior of `[^' bracket expressions and `.' so that they +stop at newlines. This is the same as specifying the \fB(?p)\fR +embedded option (see METASYNTAX, below). +.TP 15 +\fB\-lineanchor\fR +Changes the behavior of `^' and `$' (the ``anchors'') so they match the +beginning and end of a line respectively. This is the same as +specifying the \fB(?w)\fR embedded option (see METASYNTAX, below). .TP 10 \fB\-nocase\fR Upper-case characters in \fIstring\fR will be converted to lower-case @@ -66,9 +92,7 @@ by \fIsubSpec\fR use the original unconverted form of \fIstring\fR. Specifies a character index offset into the string to start matching the regular expression at. When using this switch, `^' will not match the beginning of the line, and \\A will still -match the start of the string at \fIindex\fR. If \fB\-indices\fR -is specified, the indices will be indexed starting from the -absolute beginning of the input string. +match the start of the string at \fIindex\fR. \fIindex\fR will be constrained to the bounds of the input string. .VE 8.3 .TP 10 |