CVSROOT: /webcvs/grep Module name: grep Changes by: Jim Meyering <meyering> 16/02/05 00:44:53
Index: html_node/Regular-Expressions.html =================================================================== RCS file: /webcvs/grep/grep/manual/html_node/Regular-Expressions.html,v retrieving revision 1.21 retrieving revision 1.22 diff -u -b -r1.21 -r1.22 --- html_node/Regular-Expressions.html 2 Nov 2015 02:54:36 -0000 1.21 +++ html_node/Regular-Expressions.html 5 Feb 2016 00:44:52 -0000 1.22 @@ -1,60 +1,83 @@ -<html lang="en"> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- This manual is for grep, a pattern matching engine. + +Copyright (C) 1999-2002, 2005, 2008-2016 Free Software Foundation, +Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +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.0, http://www.gnu.org/software/texinfo/ --> <head> -<title>Regular Expressions - GNU Grep 2.22</title> +<title>GNU Grep 2.23: Regular Expressions</title> + +<meta name="description" content="GNU Grep 2.23: Regular Expressions"> +<meta name="keywords" content="GNU Grep 2.23: Regular Expressions"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="description" content="GNU Grep 2.22"> -<meta name="generator" content="makeinfo 4.13"> -<link title="Top" rel="start" href="index.html#Top"> -<link rel="prev" href="Invoking.html#Invoking" title="Invoking"> -<link rel="next" href="Usage.html#Usage" title="Usage"> -<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Index.html#Index" rel="index" title="Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="index.html#Top" rel="up" title="Top"> +<link href="Fundamental-Structure.html#Fundamental-Structure" rel="next" title="Fundamental Structure"> +<link href="grep-Programs.html#grep-Programs" rel="prev" title="grep Programs"> +<style type="text/css"> <!-- -This manual is for `grep', a pattern matching engine. +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.nocodebreak {white-space: nowrap} +span.nolinebreak {white-space: nowrap} +span.roman {font-family: serif; font-weight: normal} +span.sansserif {font-family: sans-serif; font-weight: normal} +ul.no-bullet {list-style: none} +--> +</style> +<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css"> -Copyright (C) 1999-2002, 2005, 2008-2015 Free Software Foundation, -Inc. - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.3 or any later version published by the Free Software - Foundation; with no 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''. - --> -<meta http-equiv="Content-Style-Type" content="text/css"> -<style type="text/css"><!-- - pre.display { font-family:inherit } - pre.format { font-family:inherit } - pre.smalldisplay { font-family:inherit; font-size:smaller } - pre.smallformat { font-family:inherit; font-size:smaller } - pre.smallexample { font-size:smaller } - pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family:serif; font-weight:normal; } - span.sansserif { font-family:sans-serif; font-weight:normal; } ---></style> -<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css"> </head> -<body> -<div class="node"> + +<body lang="en"> <a name="Regular-Expressions"></a> +<div class="header"> <p> -Next: <a rel="next" accesskey="n" href="Usage.html#Usage">Usage</a>, -Previous: <a rel="previous" accesskey="p" href="Invoking.html#Invoking">Invoking</a>, -Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> -<hr> +Next: <a href="Usage.html#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="Invoking.html#Invoking" accesskey="p" rel="prev">Invoking</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</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> </div> - +<hr> +<a name="Regular-Expressions-1"></a> <h2 class="chapter">3 Regular Expressions</h2> +<a name="index-regular-expressions"></a> -<p><a name="index-regular-expressions-192"></a> -A <dfn>regular expression</dfn> is a pattern that describes a set of strings. +<p>A <em>regular expression</em> is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions. -<samp><span class="command">grep</span></samp> understands +<code>grep</code> understands three different versions of regular expression syntax: “basic,” (BRE) “extended” (ERE) and “perl”. -In GNU <samp><span class="command">grep</span></samp>, +In GNU <code>grep</code>, there is no difference in available functionality between the basic and extended syntaxes. In other implementations, basic regular expressions are less powerful. @@ -62,16 +85,25 @@ differences for basic regular expressions are summarized afterwards. Perl regular expressions give additional functionality, and are documented in the <i>pcresyntax</i>(3) and <i>pcrepattern</i>(3) manual pages, -but may not be available on every system. +but work only if PCRE is available in the system. +</p> +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="Fundamental-Structure.html#Fundamental-Structure" accesskey="1">Fundamental Structure</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +<tr><td align="left" valign="top">• <a href="Character-Classes-and-Bracket-Expressions.html#Character-Classes-and-Bracket-Expressions" accesskey="2">Character Classes and Bracket Expressions</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +<tr><td align="left" valign="top">• <a href="The-Backslash-Character-and-Special-Expressions.html#The-Backslash-Character-and-Special-Expressions" accesskey="3">The Backslash Character and Special Expressions</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +<tr><td align="left" valign="top">• <a href="Anchoring.html#Anchoring" accesskey="4">Anchoring</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +<tr><td align="left" valign="top">• <a href="Back_002dreferences-and-Subexpressions.html#Back_002dreferences-and-Subexpressions" accesskey="5">Back-references and Subexpressions</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +<tr><td align="left" valign="top">• <a href="Basic-vs-Extended.html#Basic-vs-Extended" accesskey="6">Basic vs Extended</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +</table> + -<ul class="menu"> -<li><a accesskey="1" href="Fundamental-Structure.html#Fundamental-Structure">Fundamental Structure</a> -<li><a accesskey="2" href="Character-Classes-and-Bracket-Expressions.html#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket Expressions</a> -<li><a accesskey="3" href="The-Backslash-Character-and-Special-Expressions.html#The-Backslash-Character-and-Special-Expressions">The Backslash Character and Special Expressions</a> -<li><a accesskey="4" href="Anchoring.html#Anchoring">Anchoring</a> -<li><a accesskey="5" href="Back_002dreferences-and-Subexpressions.html#Back_002dreferences-and-Subexpressions">Back-references and Subexpressions</a> -<li><a accesskey="6" href="Basic-vs-Extended.html#Basic-vs-Extended">Basic vs Extended</a> -</ul> - </body></html> +</body> +</html>
