aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-03-09 20:47:12 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-03-09 20:51:54 +0200
commit56b584cbc3ed2f9839c2179ae7feb5e9b080ceb6 (patch)
tree79555f3917c59828d1716ffaa455a9f946361a20 /doc/gawk.texi
parentc486a69055c5c1af8d4a8bf5842157fcc68ec072 (diff)
downloadegawk-56b584cbc3ed2f9839c2179ae7feb5e9b080ceb6.tar.gz
egawk-56b584cbc3ed2f9839c2179ae7feb5e9b080ceb6.tar.bz2
egawk-56b584cbc3ed2f9839c2179ae7feb5e9b080ceb6.zip
Doc improvements w.r.t. interval expressions.
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi54
1 files changed, 35 insertions, 19 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 7a8354eb..48ec7032 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -59,7 +59,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH February, 2019
+@set UPDATE-MONTH March, 2019
@set VERSION 5.0
@set PATCHLEVEL 0
@@ -5541,6 +5541,14 @@ You can combine regular expressions with special characters,
called @dfn{regular expression operators} or @dfn{metacharacters}, to
increase the power and versatility of regular expressions.
+@menu
+* Regexp Operator Details:: The actual details.
+* Interval Expressions:: Notes on interval expressions.
+@end menu
+
+@node Regexp Operator Details
+@subsection Regexp Operators in @command{awk}
+
The escape sequences described
@ifnotinfo
earlier
@@ -5718,6 +5726,26 @@ Matches @samp{whhhy}, @samp{whhhhy}, or @samp{whhhhhy} only.
@item wh@{2,@}y
Matches @samp{whhy}, @samp{whhhy}, and so on.
@end table
+@end table
+
+@cindex precedence, regexp operators
+@cindex regular expressions, operators, precedence of
+In regular expressions, the @samp{*}, @samp{+}, and @samp{?} operators,
+as well as the braces @samp{@{} and @samp{@}},
+have
+the highest precedence, followed by concatenation, and finally by @samp{|}.
+As in arithmetic, parentheses can change how operators are grouped.
+
+@cindex POSIX @command{awk}, regular expressions and
+@cindex @command{gawk}, regular expressions, precedence
+In POSIX @command{awk} and @command{gawk}, the @samp{*}, @samp{+}, and
+@samp{?} operators stand for themselves when there is nothing in the
+regexp that precedes them. For example, @code{/+/} matches a literal
+plus sign. However, many other versions of @command{awk} treat such a
+usage as a syntax error.
+
+@node Interval Expressions
+@subsection Some Notes On Interval Expressions
@cindex POSIX @command{awk}, interval expressions in
Interval expressions were not traditionally available in @command{awk}.
@@ -5745,26 +5773,14 @@ using a string constant with a regexp operator or function.}
Finally, when @samp{@{} and @samp{@}} appear in regexp constants
in a way that cannot be interpreted as an interval expression
(such as @code{/q@{a@}/}), then they stand for themselves.
-@end table
-@cindex precedence, regexp operators
-@cindex regular expressions, operators, precedence of
-In regular expressions, the @samp{*}, @samp{+}, and @samp{?} operators,
-as well as the braces @samp{@{} and @samp{@}},
-have
-the highest precedence, followed by concatenation, and finally by @samp{|}.
-As in arithmetic, parentheses can change how operators are grouped.
-
-@cindex POSIX @command{awk}, regular expressions and
-@cindex @command{gawk}, regular expressions, precedence
-In POSIX @command{awk} and @command{gawk}, the @samp{*}, @samp{+}, and
-@samp{?} operators stand for themselves when there is nothing in the
-regexp that precedes them. For example, @code{/+/} matches a literal
-plus sign. However, many other versions of @command{awk} treat such a
-usage as a syntax error.
+As mentioned, interval expressions were not traditionally available
+in @command{awk}. In March of 2019, Brian Kernighan's
+@command{awk} (finally) acquired them.
-If @command{gawk} is in compatibility mode (@pxref{Options}), interval
-expressions are not available in regular expressions.
+Nonetheless, because they were not available for
+so many decades, @command{gawk} continues to not supply them
+when in compatibility mode (@pxref{Options}).
@node Bracket Expressions
@section Using Bracket Expressions