CVSROOT: /webcvs/grep Module name: grep Changes by: Jim Meyering <meyering> 21/08/14 16:46:41
Index: html_node/Fundamental-Structure.html =================================================================== RCS file: /webcvs/grep/grep/manual/html_node/Fundamental-Structure.html,v retrieving revision 1.31 retrieving revision 1.32 diff -u -b -r1.31 -r1.32 --- html_node/Fundamental-Structure.html 28 Sep 2020 03:36:49 -0000 1.31 +++ html_node/Fundamental-Structure.html 14 Aug 2021 20:46:40 -0000 1.32 @@ -1,8 +1,11 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> +<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ --> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- This manual is for grep, a pattern matching engine. -Copyright (C) 1999-2002, 2005, 2008-2020 Free Software Foundation, +Copyright (C) 1999-2002, 2005, 2008-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -11,128 +14,112 @@ Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". --> -<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<title>Fundamental Structure (GNU Grep 3.5)</title> +<title>Fundamental Structure (GNU Grep 3.7)</title> -<meta name="description" content="Fundamental Structure (GNU Grep 3.5)"> -<meta name="keywords" content="Fundamental Structure (GNU Grep 3.5)"> +<meta name="description" content="Fundamental Structure (GNU Grep 3.7)"> +<meta name="keywords" content="Fundamental Structure (GNU Grep 3.7)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> -<link href="index.html#Top" rel="start" title="Top"> -<link href="Index.html#Index" rel="index" title="Index"> +<meta name="viewport" content="width=device-width,initial-scale=1"> + +<link href="index.html" rel="start" title="Top"> +<link href="Index.html" rel="index" title="Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> -<link href="Regular-Expressions.html#Regular-Expressions" rel="up" title="Regular Expressions"> -<link href="Character-Classes-and-Bracket-Expressions.html#Character-Classes-and-Bracket-Expressions" rel="next" title="Character Classes and Bracket Expressions"> -<link href="Regular-Expressions.html#Regular-Expressions" rel="prev" title="Regular Expressions"> +<link href="Regular-Expressions.html" rel="up" title="Regular Expressions"> +<link href="Character-Classes-and-Bracket-Expressions.html" rel="next" title="Character Classes and Bracket Expressions"> <style type="text/css"> <!-- +a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em} a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} -blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} -blockquote.smallquotation {font-size: smaller} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} -div.lisp {margin-left: 3.2em} -div.smalldisplay {margin-left: 3.2em} -div.smallexample {margin-left: 3.2em} -div.smalllisp {margin-left: 3.2em} kbd {font-style: oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} -pre.smalldisplay {font-family: inherit; font-size: smaller} -pre.smallexample {font-size: smaller} -pre.smallformat {font-family: inherit; font-size: smaller} -pre.smalllisp {font-size: smaller} span.nolinebreak {white-space: nowrap} span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} +span:hover a.copiable-anchor {visibility: visible} ul.no-bullet {list-style: none} --> </style> -<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css"> +<link rel="stylesheet" type="text/css" href="https://www.gnu.org/software/gnulib/manual.css"> </head> <body lang="en"> -<a name="Fundamental-Structure"></a> +<div class="section" id="Fundamental-Structure"> <div class="header"> <p> -Next: <a href="Character-Classes-and-Bracket-Expressions.html#Character-Classes-and-Bracket-Expressions" accesskey="n" rel="next">Character Classes and Bracket Expressions</a>, Up: <a href="Regular-Expressions.html#Regular-Expressions" accesskey="u" rel="up">Regular Expressions</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Character-Classes-and-Bracket-Expressions.html" accesskey="n" rel="next">Character Classes and Bracket Expressions</a>, Up: <a href="Regular-Expressions.html" accesskey="u" rel="up">Regular Expressions</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p> </div> <hr> -<a name="Fundamental-Structure-1"></a> -<h3 class="section">3.1 Fundamental Structure</h3> +<span id="Fundamental-Structure-1"></span><h3 class="section">3.1 Fundamental Structure</h3> -<p>The fundamental building blocks are the regular expressions that match -a single character. -Most characters, including all letters and digits, -are regular expressions that match themselves. -Any meta-character -with special meaning may be quoted by preceding it with a backslash. -</p> -<a name="index-_002e"></a> -<a name="index-dot"></a> -<a name="index-period"></a> +<span id="index-ordinary-characters"></span> +<span id="index-special-characters"></span> +<p>In regular expressions, the characters ‘<samp>.?*+{|()[\^$</samp>’ are +<em>special characters</em> and have uses described below. All other +characters are <em>ordinary characters</em>, and each ordinary character +is a regular expression that matches itself. +</p> +<span id="index-_002e"></span> +<span id="index-dot"></span> +<span id="index-period"></span> <p>The period ‘<samp>.</samp>’ matches any single character. It is unspecified whether ‘<samp>.</samp>’ matches an encoding error. </p> +<span id="index-interval-expressions"></span> <p>A regular expression may be followed by one of several -repetition operators: +repetition operators; the operators beginning with ‘<samp>{</samp>’ +are called <em>interval expressions</em>. </p> <dl compact="compact"> -<dt>‘<samp>?</samp>’</dt> -<dd><a name="index-_003f"></a> -<a name="index-question-mark"></a> -<a name="index-match-expression-at-most-once"></a> -<p>The preceding item is optional and will be matched at most once. -</p> -</dd> -<dt>‘<samp>*</samp>’</dt> -<dd><a name="index-_002a"></a> -<a name="index-asterisk"></a> -<a name="index-match-expression-zero-or-more-times"></a> -<p>The preceding item will be matched zero or more times. -</p> -</dd> -<dt>‘<samp>+</samp>’</dt> -<dd><a name="index-_002b"></a> -<a name="index-plus-sign"></a> -<a name="index-match-expression-one-or-more-times"></a> -<p>The preceding item will be matched one or more times. -</p> -</dd> -<dt>‘<samp>{<var>n</var>}</samp>’</dt> -<dd><a name="index-_007bn_007d"></a> -<a name="index-braces_002c-one-argument"></a> -<a name="index-match-expression-n-times"></a> +<dt id='index-_003f'><span>‘<samp>?</samp>’<a href='#index-_003f' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-question-mark"></span> +<span id="index-match-expression-at-most-once"></span> +<p>The preceding item is optional and is matched at most once. +</p> +</dd> +<dt id='index-_002a'><span>‘<samp>*</samp>’<a href='#index-_002a' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-asterisk"></span> +<span id="index-match-expression-zero-or-more-times"></span> +<p>The preceding item is matched zero or more times. +</p> +</dd> +<dt id='index-_002b'><span>‘<samp>+</samp>’<a href='#index-_002b' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-plus-sign"></span> +<span id="index-match-expression-one-or-more-times"></span> +<p>The preceding item is matched one or more times. +</p> +</dd> +<dt id='index-_007bn_007d'><span>‘<samp>{<var>n</var>}</samp>’<a href='#index-_007bn_007d' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-braces_002c-one-argument"></span> +<span id="index-match-expression-n-times"></span> <p>The preceding item is matched exactly <var>n</var> times. </p> </dd> -<dt>‘<samp>{<var>n</var>,}</samp>’</dt> -<dd><a name="index-_007bn_002c_007d"></a> -<a name="index-braces_002c-second-argument-omitted"></a> -<a name="index-match-expression-n-or-more-times"></a> +<dt id='index-_007bn_002c_007d'><span>‘<samp>{<var>n</var>,}</samp>’<a href='#index-_007bn_002c_007d' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-braces_002c-second-argument-omitted"></span> +<span id="index-match-expression-n-or-more-times"></span> <p>The preceding item is matched <var>n</var> or more times. </p> </dd> -<dt>‘<samp>{,<var>m</var>}</samp>’</dt> -<dd><a name="index-_007b_002cm_007d"></a> -<a name="index-braces_002c-first-argument-omitted"></a> -<a name="index-match-expression-at-most-m-times"></a> +<dt id='index-_007b_002cm_007d'><span>‘<samp>{,<var>m</var>}</samp>’<a href='#index-_007b_002cm_007d' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-braces_002c-first-argument-omitted"></span> +<span id="index-match-expression-at-most-m-times"></span> <p>The preceding item is matched at most <var>m</var> times. This is a GNU extension. </p> </dd> -<dt>‘<samp>{<var>n</var>,<var>m</var>}</samp>’</dt> -<dd><a name="index-_007bn_002cm_007d"></a> -<a name="index-braces_002c-two-arguments"></a> -<a name="index-match-expression-from-n-to-m-times"></a> +<dt id='index-_007bn_002cm_007d'><span>‘<samp>{<var>n</var>,<var>m</var>}</samp>’<a href='#index-_007bn_002cm_007d' class='copiable-anchor'> ¶</a></span></dt> +<dd><span id="index-braces_002c-two-arguments"></span> +<span id="index-match-expression-from-n-to-m-times"></span> <p>The preceding item is matched at least <var>n</var> times, but not more than <var>m</var> times. </p> @@ -155,10 +142,11 @@ to override these precedence rules and form a subexpression. An unmatched ‘<samp>)</samp>’ matches just itself. </p> +</div> <hr> <div class="header"> <p> -Next: <a href="Character-Classes-and-Bracket-Expressions.html#Character-Classes-and-Bracket-Expressions" accesskey="n" rel="next">Character Classes and Bracket Expressions</a>, Up: <a href="Regular-Expressions.html#Regular-Expressions" accesskey="u" rel="up">Regular Expressions</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Character-Classes-and-Bracket-Expressions.html">Character Classes and Bracket Expressions</a>, Up: <a href="Regular-Expressions.html">Regular Expressions</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p> </div>
