summaryrefslogtreecommitdiffstats
path: root/doc/RegExp.3
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-11-01 15:48:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-11-01 15:48:27 (GMT)
commitba0f9ef3892cbd55c984b3b07fa3301a66ba9965 (patch)
treeba9dc010302e4218a942ee8db65b225f4b123070 /doc/RegExp.3
parent26a7fe964873387b4eeb9ae331517cc3a880ee72 (diff)
downloadtcl-ba0f9ef3892cbd55c984b3b07fa3301a66ba9965.zip
tcl-ba0f9ef3892cbd55c984b3b07fa3301a66ba9965.tar.gz
tcl-ba0f9ef3892cbd55c984b3b07fa3301a66ba9965.tar.bz2
Clarified documentation of RE flags. [Bug 1167840]
Diffstat (limited to 'doc/RegExp.3')
-rw-r--r--doc/RegExp.326
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/RegExp.3 b/doc/RegExp.3
index e27459e..7cce1da 100644
--- a/doc/RegExp.3
+++ b/doc/RegExp.3
@@ -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: RegExp.3,v 1.26 2007/10/28 14:17:39 dkf Exp $
+'\" RCS: @(#) $Id: RegExp.3,v 1.27 2007/11/01 15:48:27 dkf Exp $
'\"
.so man.macros
.TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures"
@@ -40,7 +40,7 @@ int
.sp
void
\fBTcl_RegExpGetInfo\fR(\fIregexp\fR, \fIinfoPtr\fR)
-
+.fi
.SH ARGUMENTS
.AS Tcl_RegExpInfo *interp in/out
.AP Tcl_Interp *interp in
@@ -77,7 +77,11 @@ NULL if there is no such range.
The address of the character just after the last one in the range
is stored here, or NULL if there is no such range.
.AP int cflags in
-OR-ed combination of compilation flags. See below for more information.
+OR-ed combination of the compilation flags \fBTCL_REG_ADVANCED\fR,
+\fBTCL_REG_EXTENDED\fR, \fBTCL_REG_BASIC\fR, \fBTCL_REG_EXPANDED\fR,
+\fBTCL_REG_QUOTE\fR, \fBTCL_REG_NOCASE\fR, \fBTCL_REG_NEWLINE\fR,
+\fBTCL_REG_NLSTOP\fR, \fBTCL_REG_NLANCH\fR, \fBTCL_REG_NOSUB\fR, and
+\fBTCL_REG_CANMATCH\fR. See below for more information.
.AP int offset in
The character offset into the text where matching should begin.
The value of the offset has no impact on \fB^\fR matches. This
@@ -85,18 +89,17 @@ behavior is controlled by \fIeflags\fR.
.AP int nmatches in
The number of matching subexpressions that should be remembered for
later use. If this value is 0, then no subexpression match
-information will be computed. If the value is -1, then
+information will be computed. If the value is \-1, then
all of the matching subexpressions will be remembered. Any other
value will be taken as the maximum number of subexpressions to
remember.
.AP int eflags in
-OR-ed combination of the values \fBTCL_REG_NOTBOL\fR and \fBTCL_REG_NOTEOL\fR.
-See below for more information.
+OR-ed combination of the execution flags \fBTCL_REG_NOTBOL\fR and
+\fBTCL_REG_NOTEOL\fR. See below for more information.
.AP Tcl_RegExpInfo *infoPtr out
The address of the location where information about a previous match
should be stored by \fBTcl_RegExpGetInfo\fR.
.BE
-
.SH DESCRIPTION
.PP
\fBTcl_RegExpMatch\fR determines whether its \fIpattern\fR argument
@@ -183,7 +186,7 @@ occurs while compiling the regular expression then
\fBTcl_GetRegExpFromObj\fR returns NULL and leaves an error message in
the interpreter result. The regular expression token can be used as
long as the internal representation of \fIpatObj\fR refers to the
-compiled form. The \fIeflags\fR argument is a bit-wise OR of
+compiled form. The \fIcflags\fR argument is a bit-wise OR of
zero or more of the following flags that control the compilation of
\fIpatObj\fR:
.RS 2
@@ -300,7 +303,7 @@ error message in the interpreter result. The \fInmatches\fR value
indicates to the matcher how many subexpressions are of interest. If
\fInmatches\fR is 0, then no subexpression match information is
recorded, which may allow the matcher to make various optimizations.
-If the value is -1, then all of the subexpressions in the pattern are
+If the value is \-1, then all of the subexpressions in the pattern are
remembered. If the value is a positive integer, then only that number
of subexpressions will be remembered. Matching begins at the
specified Unicode character index given by \fIoffset\fR. Unlike
@@ -366,7 +369,7 @@ subexpression. The \fIend\fR index identifies the first character
after the matched subexpression. If the subexpression matched the
empty string, then \fIstart\fR and \fIend\fR will be equal. If the
subexpression did not participate in the match, then \fIstart\fR and
-\fIend\fR will be set to -1.
+\fIend\fR will be set to \-1.
.PP
The \fIextendStart\fR field in \fBTcl_RegExpInfo\fR is only set if the
\fBTCL_REG_CANMATCH\fR flag was used. It indicates the first
@@ -375,8 +378,7 @@ found, this will be the same as the beginning of the current match.
If no match was found, then it indicates the earliest point at which a
match might occur if additional text is appended to the string. If it
is no match is possible even with further text, this field will be set
-to -1.
-
+to \-1.
.SH "SEE ALSO"
re_syntax(n)
.SH KEYWORDS