summaryrefslogtreecommitdiffstats
path: root/doc/re_syntax.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-01-05 20:34:35 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-01-05 20:34:35 (GMT)
commitfb6da59e2f75fde712df8d3936b702d2e4a85343 (patch)
treec6062bb96f4b106ff45409517a478c948ab4ad69 /doc/re_syntax.n
parentc040d037ef8145575f4df9a31bf4d6c023e096d4 (diff)
parent279c0829fcf5d56c5c0c9105bc6c4a1837bdad06 (diff)
downloadtcl-fb6da59e2f75fde712df8d3936b702d2e4a85343.zip
tcl-fb6da59e2f75fde712df8d3936b702d2e4a85343.tar.gz
tcl-fb6da59e2f75fde712df8d3936b702d2e4a85343.tar.bz2
Fix unclear language in re_syntax. [2da4c23916]
Diffstat (limited to 'doc/re_syntax.n')
-rw-r--r--doc/re_syntax.n19
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/re_syntax.n b/doc/re_syntax.n
index 4504a58..628b1bf 100644
--- a/doc/re_syntax.n
+++ b/doc/re_syntax.n
@@ -137,11 +137,26 @@ later, under \fBESCAPES\fR.
.TP 8
\fB^\fR
.
-matches at the beginning of a line
+matches at the beginning of the string or a line (according to whether
+matching is line-sensitive or not, as described in \fBMATCHING\fR,
+below).
.TP
\fB$\fR
.
-matches at the end of a line
+matches at the end of the string or a line (according to whether
+matching is line-sensitive or not, as described in \fBMATCHING\fR,
+below).
+.RS
+.PP
+The difference between string and line matching modes is immaterial
+when the string does not contain a newline character. The \fB\eA\fR
+and \fB\eZ\fR constraint escapes have a similar purpose, but are
+always constraints for the overall string.
+.PP
+The default line-sensitvity depends on the command that uses the
+regular expression, and can be overridden as described in
+\fBMETASYNTAX\fR, below.
+.RE
.TP
\fB(?=\fIre\fB)\fR
.