grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to grep/manual/html_node/Character-Classes-and-Bracket-Expressio


From: Jim Meyering
Subject: Changes to grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html, v
Date: Sat, 14 Aug 2021 16:46:42 -0400 (EDT)

CVSROOT:        /webcvs/grep
Module name:    grep
Changes by:     Jim Meyering <meyering> 21/08/14 16:46:41

Index: html_node/Character-Classes-and-Bracket-Expressions.html
===================================================================
RCS file: 
/webcvs/grep/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- html_node/Character-Classes-and-Bracket-Expressions.html    28 Sep 2020 
03:36:49 -0000      1.31
+++ html_node/Character-Classes-and-Bracket-Expressions.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,66 +14,56 @@
 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>Character Classes and Bracket Expressions (GNU Grep 3.5)</title>
+<title>Character Classes and Bracket Expressions (GNU Grep 3.7)</title>
 
-<meta name="description" content="Character Classes and Bracket Expressions 
(GNU Grep 3.5)">
-<meta name="keywords" content="Character Classes and Bracket Expressions (GNU 
Grep 3.5)">
+<meta name="description" content="Character Classes and Bracket Expressions 
(GNU Grep 3.7)">
+<meta name="keywords" content="Character Classes and Bracket Expressions (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="The-Backslash-Character-and-Special-Expressions.html#The-Backslash-Character-and-Special-Expressions"
 rel="next" title="The Backslash Character and Special Expressions">
-<link href="Fundamental-Structure.html#Fundamental-Structure" rel="prev" 
title="Fundamental Structure">
+<link href="Regular-Expressions.html" rel="up" title="Regular Expressions">
+<link href="The-Backslash-Character-and-Special-Expressions.html" rel="next" 
title="The Backslash Character and Special Expressions">
+<link href="Fundamental-Structure.html" rel="prev" title="Fundamental 
Structure">
 <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="Character-Classes-and-Bracket-Expressions"></a>
+<div class="section" id="Character-Classes-and-Bracket-Expressions">
 <div class="header">
 <p>
-Next: <a 
href="The-Backslash-Character-and-Special-Expressions.html#The-Backslash-Character-and-Special-Expressions"
 accesskey="n" rel="next">The Backslash Character and Special Expressions</a>, 
Previous: <a href="Fundamental-Structure.html#Fundamental-Structure" 
accesskey="p" rel="prev">Fundamental Structure</a>, Up: <a 
href="Regular-Expressions.html#Regular-Expressions" accesskey="u" 
rel="up">Regular Expressions</a> &nbsp; [<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="The-Backslash-Character-and-Special-Expressions.html" 
accesskey="n" rel="next">The Backslash Character and Special Expressions</a>, 
Previous: <a href="Fundamental-Structure.html" accesskey="p" 
rel="prev">Fundamental Structure</a>, Up: <a href="Regular-Expressions.html" 
accesskey="u" rel="up">Regular Expressions</a> &nbsp; [<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="Character-Classes-and-Bracket-Expressions-1"></a>
-<h3 class="section">3.2 Character Classes and Bracket Expressions</h3>
+<span id="Character-Classes-and-Bracket-Expressions-1"></span><h3 
class="section">3.2 Character Classes and Bracket Expressions</h3>
 
-<a name="index-bracket-expression"></a>
-<a name="index-character-class"></a>
+<span id="index-bracket-expression"></span>
+<span id="index-character-class"></span>
 <p>A <em>bracket expression</em> is a list of characters enclosed by 
&lsquo;<samp>[</samp>&rsquo; and
 &lsquo;<samp>]</samp>&rsquo;.
 It matches any single character in that list.
@@ -83,7 +76,7 @@
 an opening or closing parenthesis, and might or might not match an
 encoding error.
 </p>
-<a name="index-range-expression"></a>
+<span id="index-range-expression"></span>
 <p>Within a bracket expression, a <em>range expression</em> consists of two
 characters separated by a hyphen.
 It matches any single character that
@@ -104,35 +97,31 @@
 for example, &lsquo;<samp>[[:alnum:]]</samp>&rsquo; means the character class 
of numbers and letters
 in the current locale.
 </p>
-<a name="index-classes-of-characters"></a>
-<a name="index-character-classes"></a>
+<span id="index-classes-of-characters"></span>
+<span id="index-character-classes"></span>
 <dl compact="compact">
-<dt>&lsquo;<samp>[:alnum:]</samp>&rsquo;</dt>
-<dd><a name="index-alnum-character-class"></a>
-<a name="index-alphanumeric-characters"></a>
+<dt 
id='index-alnum-character-class'><span>&lsquo;<samp>[:alnum:]</samp>&rsquo;<a 
href='#index-alnum-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-alphanumeric-characters"></span>
 <p>Alphanumeric characters:
 &lsquo;<samp>[:alpha:]</samp>&rsquo; and &lsquo;<samp>[:digit:]</samp>&rsquo;; 
in the &lsquo;<samp>C</samp>&rsquo; locale and ASCII
 character encoding, this is the same as &lsquo;<samp>[0-9A-Za-z]</samp>&rsquo;.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:alpha:]</samp>&rsquo;</dt>
-<dd><a name="index-alpha-character-class"></a>
-<a name="index-alphabetic-characters"></a>
+<dt 
id='index-alpha-character-class'><span>&lsquo;<samp>[:alpha:]</samp>&rsquo;<a 
href='#index-alpha-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-alphabetic-characters"></span>
 <p>Alphabetic characters:
 &lsquo;<samp>[:lower:]</samp>&rsquo; and &lsquo;<samp>[:upper:]</samp>&rsquo;; 
in the &lsquo;<samp>C</samp>&rsquo; locale and ASCII
 character encoding, this is the same as &lsquo;<samp>[A-Za-z]</samp>&rsquo;.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:blank:]</samp>&rsquo;</dt>
-<dd><a name="index-blank-character-class"></a>
-<a name="index-blank-characters"></a>
+<dt 
id='index-blank-character-class'><span>&lsquo;<samp>[:blank:]</samp>&rsquo;<a 
href='#index-blank-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-blank-characters"></span>
 <p>Blank characters:
 space and tab.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:cntrl:]</samp>&rsquo;</dt>
-<dd><a name="index-cntrl-character-class"></a>
-<a name="index-control-characters"></a>
+<dt 
id='index-cntrl-character-class'><span>&lsquo;<samp>[:cntrl:]</samp>&rsquo;<a 
href='#index-cntrl-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-control-characters"></span>
 <p>Control characters.
 In ASCII, these characters have octal codes 000
 through 037, and 177 (DEL).
@@ -140,64 +129,56 @@
 the equivalent characters, if any.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:digit:]</samp>&rsquo;</dt>
-<dd><a name="index-digit-character-class"></a>
-<a name="index-digit-characters"></a>
-<a name="index-numeric-characters"></a>
+<dt 
id='index-digit-character-class'><span>&lsquo;<samp>[:digit:]</samp>&rsquo;<a 
href='#index-digit-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-digit-characters"></span>
+<span id="index-numeric-characters"></span>
 <p>Digits: <code>0 1 2 3 4 5 6 7 8 9</code>.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:graph:]</samp>&rsquo;</dt>
-<dd><a name="index-graph-character-class"></a>
-<a name="index-graphic-characters"></a>
+<dt 
id='index-graph-character-class'><span>&lsquo;<samp>[:graph:]</samp>&rsquo;<a 
href='#index-graph-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-graphic-characters"></span>
 <p>Graphical characters:
 &lsquo;<samp>[:alnum:]</samp>&rsquo; and &lsquo;<samp>[:punct:]</samp>&rsquo;.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:lower:]</samp>&rsquo;</dt>
-<dd><a name="index-lower-character-class"></a>
-<a name="index-lower_002dcase-letters"></a>
+<dt 
id='index-lower-character-class'><span>&lsquo;<samp>[:lower:]</samp>&rsquo;<a 
href='#index-lower-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-lower_002dcase-letters"></span>
 <p>Lower-case letters; in the &lsquo;<samp>C</samp>&rsquo; locale and ASCII 
character
 encoding, this is
 <code>a b c d e f g h i j k l m n o p q r s t u v w x y z</code>.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:print:]</samp>&rsquo;</dt>
-<dd><a name="index-print-character-class"></a>
-<a name="index-printable-characters"></a>
+<dt 
id='index-print-character-class'><span>&lsquo;<samp>[:print:]</samp>&rsquo;<a 
href='#index-print-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-printable-characters"></span>
 <p>Printable characters:
 &lsquo;<samp>[:alnum:]</samp>&rsquo;, &lsquo;<samp>[:punct:]</samp>&rsquo;, 
and space.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:punct:]</samp>&rsquo;</dt>
-<dd><a name="index-punct-character-class"></a>
-<a name="index-punctuation-characters"></a>
+<dt 
id='index-punct-character-class'><span>&lsquo;<samp>[:punct:]</samp>&rsquo;<a 
href='#index-punct-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-punctuation-characters"></span>
 <p>Punctuation characters; in the &lsquo;<samp>C</samp>&rsquo; locale and 
ASCII character
 encoding, this is
 <code>! &quot; # $ % &amp; ' ( ) * + , - . / : ; &lt; = &gt; ? @ [ \ ] ^ _ ` { 
| } ~</code>.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:space:]</samp>&rsquo;</dt>
-<dd><a name="index-space-character-class"></a>
-<a name="index-space-characters"></a>
-<a name="index-whitespace-characters"></a>
+<dt 
id='index-space-character-class'><span>&lsquo;<samp>[:space:]</samp>&rsquo;<a 
href='#index-space-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-space-characters"></span>
+<span id="index-whitespace-characters"></span>
 <p>Space characters: in the &lsquo;<samp>C</samp>&rsquo; locale, this is
 tab, newline, vertical tab, form feed, carriage return, and space.
-See <a href="Usage.html#Usage">Usage</a>, for more discussion of matching 
newlines.
+See <a href="Usage.html">Usage</a>, for more discussion of matching newlines.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:upper:]</samp>&rsquo;</dt>
-<dd><a name="index-upper-character-class"></a>
-<a name="index-upper_002dcase-letters"></a>
+<dt 
id='index-upper-character-class'><span>&lsquo;<samp>[:upper:]</samp>&rsquo;<a 
href='#index-upper-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-upper_002dcase-letters"></span>
 <p>Upper-case letters: in the &lsquo;<samp>C</samp>&rsquo; locale and ASCII 
character
 encoding, this is
 <code>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</code>.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:xdigit:]</samp>&rsquo;</dt>
-<dd><a name="index-xdigit-character-class"></a>
-<a name="index-xdigit-class"></a>
-<a name="index-hexadecimal-digits"></a>
+<dt 
id='index-xdigit-character-class'><span>&lsquo;<samp>[:xdigit:]</samp>&rsquo;<a 
href='#index-xdigit-character-class' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-xdigit-class"></span>
+<span id="index-hexadecimal-digits"></span>
 <p>Hexadecimal digits:
 <code>0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f</code>.
 </p>
@@ -207,52 +188,52 @@
 part of the symbolic names, and must be included in addition to
 the brackets delimiting the bracket expression.
 </p>
-<a name="invalid_002dbracket_002dexpr"></a><p>If you mistakenly omit the outer 
brackets, and search for say, &lsquo;<samp>[:upper:]</samp>&rsquo;,
+<span id="invalid_002dbracket_002dexpr"></span><p>If you mistakenly omit the 
outer brackets, and search for say, &lsquo;<samp>[:upper:]</samp>&rsquo;,
 GNU <code>grep</code> prints a diagnostic and exits with status 2, on
 the assumption that you did not intend to search for the nominally
 equivalent regular expression: &lsquo;<samp>[:epru]</samp>&rsquo;.
 Set the <code>POSIXLY_CORRECT</code> environment variable to disable this 
feature.
 </p>
-<p>Most meta-characters lose their special meaning inside bracket expressions.
+<p>Special characters lose their special meaning inside bracket expressions.
 </p>
 <dl compact="compact">
-<dt>&lsquo;<samp>]</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>]</samp>&rsquo;</span></dt>
 <dd><p>ends the bracket expression if it&rsquo;s not the first list item.
 So, if you want to make the &lsquo;<samp>]</samp>&rsquo; character a list item,
 you must put it first.
 </p>
 </dd>
-<dt>&lsquo;<samp>[.</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>[.</samp>&rsquo;</span></dt>
 <dd><p>represents the open collating symbol.
 </p>
 </dd>
-<dt>&lsquo;<samp>.]</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>.]</samp>&rsquo;</span></dt>
 <dd><p>represents the close collating symbol.
 </p>
 </dd>
-<dt>&lsquo;<samp>[=</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>[=</samp>&rsquo;</span></dt>
 <dd><p>represents the open equivalence class.
 </p>
 </dd>
-<dt>&lsquo;<samp>=]</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>=]</samp>&rsquo;</span></dt>
 <dd><p>represents the close equivalence class.
 </p>
 </dd>
-<dt>&lsquo;<samp>[:</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>[:</samp>&rsquo;</span></dt>
 <dd><p>represents the open character class symbol, and should be followed by a
 valid character class name.
 </p>
 </dd>
-<dt>&lsquo;<samp>:]</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>:]</samp>&rsquo;</span></dt>
 <dd><p>represents the close character class symbol.
 </p>
 </dd>
-<dt>&lsquo;<samp>-</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>-</samp>&rsquo;</span></dt>
 <dd><p>represents the range if it&rsquo;s not first or last in a list or the 
ending point
 of a range.
 </p>
 </dd>
-<dt>&lsquo;<samp>^</samp>&rsquo;</dt>
+<dt><span>&lsquo;<samp>^</samp>&rsquo;</span></dt>
 <dd><p>represents the characters not in the list.
 If you want to make the &lsquo;<samp>^</samp>&rsquo;
 character a list item, place it anywhere but first.
@@ -260,10 +241,11 @@
 </dd>
 </dl>
 
+</div>
 <hr>
 <div class="header">
 <p>
-Next: <a 
href="The-Backslash-Character-and-Special-Expressions.html#The-Backslash-Character-and-Special-Expressions"
 accesskey="n" rel="next">The Backslash Character and Special Expressions</a>, 
Previous: <a href="Fundamental-Structure.html#Fundamental-Structure" 
accesskey="p" rel="prev">Fundamental Structure</a>, Up: <a 
href="Regular-Expressions.html#Regular-Expressions" accesskey="u" 
rel="up">Regular Expressions</a> &nbsp; [<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="The-Backslash-Character-and-Special-Expressions.html">The 
Backslash Character and Special Expressions</a>, Previous: <a 
href="Fundamental-Structure.html">Fundamental Structure</a>, Up: <a 
href="Regular-Expressions.html">Regular Expressions</a> &nbsp; [<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>
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]