changeset 28063:f1b33463506d

*** empty log message ***
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 08 Mar 2000 23:26:00 +0000
parents 26edef632c89
children 34cb92c8c3e4
files etc/NEWS man/search.texi src/ChangeLog
diffstat 3 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Wed Mar 08 23:25:41 2000 +0000
+++ b/etc/NEWS	Wed Mar 08 23:26:00 2000 +0000
@@ -1087,7 +1087,7 @@
 
 +++
 ** Regular expressions now support intervals \{n,m\} as well as
-Perl's non-greedy *? +? and ?? operators.
+Perl's shy-groups \(?:...\) and non-greedy *? +? and ?? operators.
 
 +++
 ** The optional argument BUFFER of function file-local-copy has been
--- a/man/search.texi	Wed Mar 08 23:25:41 2000 +0000
+++ b/man/search.texi	Wed Mar 08 23:26:00 2000 +0000
@@ -432,16 +432,16 @@
 as they can, while if you append a @samp{?} after them, it makes them
 non-greedy: they will match as little as possible.
 
-@item \@{n,m\@}
+@item \@{@var{n},@var{m}\@}
 is another postfix operator that specifies an interval of iteration:
-the preceding regular expression must match between @samp{n} and
-@samp{m} times.  If @samp{m} is omitted, then there is no upper bound
-and if @samp{,m} is omitted, then the regular expression must match
-exactly @samp{n} times.				@*
+the preceding regular expression must match between @var{n} and
+@var{m} times.  If @var{m} is omitted, then there is no upper bound
+and if @var{,m} is omitted, then the regular expression must match
+exactly @var{n} times.				@*
 @samp{\@{0,1\@}} is equivalent to @samp{?}.	@*
 @samp{\@{0,\@}} is equivalent to @samp{*}.	@*
 @samp{\@{1,\@}} is equivalent to @samp{+}.	@*
-@samp{\@{n\@}} is equivalent to @samp{\@{n,n\@}}.
+@samp{\@{@var{n}\@}} is equivalent to @samp{\@{@var{n},@var{n}\@}}.
 
 @item [ @dots{} ]
 is a @dfn{character set}, which begins with @samp{[} and is terminated
@@ -560,7 +560,15 @@
 This last application is not a consequence of the idea of a
 parenthetical grouping; it is a separate feature that is assigned as a
 second meaning to the same @samp{\( @dots{} \)} construct.  In practice
-there is no conflict between the two meanings.
+there is almost no conflict between the two meanings.
+
+@item \(?: @dots{} \)
+is another grouping construct (often called ``shy'') that serves the same
+first two purposes, but not the third:
+it cannot be referred to later on by number.  This is only useful
+for mechanically constructed regular expressions where grouping
+constructs need to be introduced implicitly and hence risk changing the
+numbering of subsequent groups.
 
 @item \@var{d}
 matches the same text that matched the @var{d}th occurrence of a
Binary file src/ChangeLog has changed