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: Fri, 02 Mar 2012 09:28:37 +0000

CVSROOT:        /webcvs/grep
Module name:    grep
Changes by:     Jim Meyering <meyering> 12/03/02 09:28:32

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.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- html_node/Character-Classes-and-Bracket-Expressions.html    25 Jun 2011 
09:28:45 -0000      1.9
+++ html_node/Character-Classes-and-Bracket-Expressions.html    2 Mar 2012 
09:28:26 -0000       1.10
@@ -1,8 +1,8 @@
 <html lang="en">
 <head>
-<title>Character Classes and Bracket Expressions - GNU Grep 2.9</title>
+<title>Character Classes and Bracket Expressions - GNU Grep 2.11</title>
 <meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="GNU Grep 2.9">
+<meta name="description" content="GNU Grep 2.11">
 <meta name="generator" content="makeinfo 4.13">
 <link title="Top" rel="start" href="index.html#Top">
 <link rel="up" href="Regular-Expressions.html#Regular-Expressions" 
title="Regular Expressions">
@@ -12,7 +12,8 @@
 <!--
 This manual is for `grep', a pattern matching engine.
 
-Copyright (C) 1999-2002, 2005, 2008-2011 Free Software Foundation, Inc.
+Copyright (C) 1999-2002, 2005, 2008-2012 Free Software Foundation,
+Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -72,22 +73,22 @@
    <p>Finally, certain named classes of characters are predefined within
 bracket expressions, as follows. 
 Their interpretation depends on the <code>LC_CTYPE</code> locale;
-the interpretation below is that of the &lsquo;<samp><span 
class="samp">C</span></samp>&rsquo; locale,
-which is the default if no <code>LC_CTYPE</code> locale is specified.
+for example, &lsquo;<samp><span class="samp">[[:alnum:]]</span></samp>&rsquo; 
means the character class of numbers and letters
+in the current locale.
 
    <p><a name="index-classes-of-characters-210"></a><a 
name="index-character-classes-211"></a>
      <dl>
 <dt>&lsquo;<samp><span class="samp">[:alnum:]</span></samp>&rsquo;<dd><a 
name="index-alnum-_0040r_007bcharacter-class_007d-212"></a><a 
name="index-alphanumeric-characters-213"></a>Alphanumeric characters:
-&lsquo;<samp><span class="samp">[:alpha:]</span></samp>&rsquo; and 
&lsquo;<samp><span class="samp">[:digit:]</span></samp>&rsquo;.
+&lsquo;<samp><span class="samp">[:alpha:]</span></samp>&rsquo; and 
&lsquo;<samp><span class="samp">[:digit:]</span></samp>&rsquo;; in the 
&lsquo;<samp><span class="samp">C</span></samp>&rsquo; locale and ASCII 
character encoding, this is the same as &lsquo;<samp><span 
class="samp">[0-9A-Za-z]</span></samp>&rsquo;.
 
      <br><dt>&lsquo;<samp><span 
class="samp">[:alpha:]</span></samp>&rsquo;<dd><a 
name="index-alpha-_0040r_007bcharacter-class_007d-214"></a><a 
name="index-alphabetic-characters-215"></a>Alphabetic characters:
-&lsquo;<samp><span class="samp">[:lower:]</span></samp>&rsquo; and 
&lsquo;<samp><span class="samp">[:upper:]</span></samp>&rsquo;.
+&lsquo;<samp><span class="samp">[:lower:]</span></samp>&rsquo; and 
&lsquo;<samp><span class="samp">[:upper:]</span></samp>&rsquo;; in the 
&lsquo;<samp><span class="samp">C</span></samp>&rsquo; locale and ASCII 
character encoding, this is the same as &lsquo;<samp><span 
class="samp">[A-Za-z]</span></samp>&rsquo;.
 
      <br><dt>&lsquo;<samp><span 
class="samp">[:blank:]</span></samp>&rsquo;<dd><a 
name="index-blank-_0040r_007bcharacter-class_007d-216"></a><a 
name="index-blank-characters-217"></a>Blank characters:
 space and tab.
 
      <br><dt>&lsquo;<samp><span 
class="samp">[:cntrl:]</span></samp>&rsquo;<dd><a 
name="index-cntrl-_0040r_007bcharacter-class_007d-218"></a><a 
name="index-control-characters-219"></a>Control characters. 
-In <span class="sc">ascii</span>, these characters have octal codes 000
+In ASCII, these characters have octal codes 000
 through 037, and 177 (<code>DEL</code>). 
 In other character sets, these are
 the equivalent characters, if any.
@@ -97,32 +98,32 @@
      <br><dt>&lsquo;<samp><span 
class="samp">[:graph:]</span></samp>&rsquo;<dd><a 
name="index-graph-_0040r_007bcharacter-class_007d-223"></a><a 
name="index-graphic-characters-224"></a>Graphical characters:
 &lsquo;<samp><span class="samp">[:alnum:]</span></samp>&rsquo; and 
&lsquo;<samp><span class="samp">[:punct:]</span></samp>&rsquo;.
 
-     <br><dt>&lsquo;<samp><span 
class="samp">[:lower:]</span></samp>&rsquo;<dd><a 
name="index-lower-_0040r_007bcharacter-class_007d-225"></a><a 
name="index-lower_002dcase-letters-226"></a>Lower-case letters:
+     <br><dt>&lsquo;<samp><span 
class="samp">[:lower:]</span></samp>&rsquo;<dd><a 
name="index-lower-_0040r_007bcharacter-class_007d-225"></a><a 
name="index-lower_002dcase-letters-226"></a>Lower-case letters; in the 
&lsquo;<samp><span class="samp">C</span></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>.
 
      <br><dt>&lsquo;<samp><span 
class="samp">[:print:]</span></samp>&rsquo;<dd><a 
name="index-print-_0040r_007bcharacter-class_007d-227"></a><a 
name="index-printable-characters-228"></a>Printable characters:
 &lsquo;<samp><span class="samp">[:alnum:]</span></samp>&rsquo;, 
&lsquo;<samp><span class="samp">[:punct:]</span></samp>&rsquo;, and space.
 
-     <br><dt>&lsquo;<samp><span 
class="samp">[:punct:]</span></samp>&rsquo;<dd><a 
name="index-punct-_0040r_007bcharacter-class_007d-229"></a><a 
name="index-punctuation-characters-230"></a>Punctuation characters:
+     <br><dt>&lsquo;<samp><span 
class="samp">[:punct:]</span></samp>&rsquo;<dd><a 
name="index-punct-_0040r_007bcharacter-class_007d-229"></a><a 
name="index-punctuation-characters-230"></a>Punctuation characters; in the 
&lsquo;<samp><span class="samp">C</span></samp>&rsquo; locale and ASCII 
character
+encoding, this is
 <code>! " # $ % &amp; ' ( ) * + , - . / : ; &lt; = &gt; ? @ [ \ ] ^ _ ` { | } 
~</code>.
 
-     <br><dt>&lsquo;<samp><span 
class="samp">[:space:]</span></samp>&rsquo;<dd><a 
name="index-space-_0040r_007bcharacter-class_007d-231"></a><a 
name="index-space-characters-232"></a><a 
name="index-whitespace-characters-233"></a>Space characters:
+     <br><dt>&lsquo;<samp><span 
class="samp">[:space:]</span></samp>&rsquo;<dd><a 
name="index-space-_0040r_007bcharacter-class_007d-231"></a><a 
name="index-space-characters-232"></a><a 
name="index-whitespace-characters-233"></a>Space characters: in the 
&lsquo;<samp><span class="samp">C</span></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.
 
-     <br><dt>&lsquo;<samp><span 
class="samp">[:upper:]</span></samp>&rsquo;<dd><a 
name="index-upper-_0040r_007bcharacter-class_007d-234"></a><a 
name="index-upper_002dcase-letters-235"></a>Upper-case letters:
+     <br><dt>&lsquo;<samp><span 
class="samp">[:upper:]</span></samp>&rsquo;<dd><a 
name="index-upper-_0040r_007bcharacter-class_007d-234"></a><a 
name="index-upper_002dcase-letters-235"></a>Upper-case letters: in the 
&lsquo;<samp><span class="samp">C</span></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>.
 
      <br><dt>&lsquo;<samp><span 
class="samp">[:xdigit:]</span></samp>&rsquo;<dd><a 
name="index-xdigit-_0040r_007bcharacter-class_007d-236"></a><a 
name="index-xdigit-class-237"></a><a 
name="index-hexadecimal-digits-238"></a>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>.
 
    </dl>
-   For example, &lsquo;<samp><span 
class="samp">[[:alnum:]]</span></samp>&rsquo; means &lsquo;<samp><span 
class="samp">[0-9A-Za-z]</span></samp>&rsquo;, except the latter
-depends upon the &lsquo;<samp><span class="samp">C</span></samp>&rsquo; locale 
and the <span class="sc">ascii</span> character
-encoding, whereas the former is independent of locale and character set. 
-(Note that the brackets in these class names are
+   Note that the brackets in these class names are
 part of the symbolic names, and must be included in addition to
-the brackets delimiting the bracket expression.)
+the brackets delimiting the bracket expression.
 
    <p><a name="invalid_002dbracket_002dexpr"></a>If you mistakenly omit the 
outer brackets, and search for say, &lsquo;<samp><span 
class="samp">[:upper:]</span></samp>&rsquo;,
 GNU <samp><span class="command">grep</span></samp> prints a diagnostic and 
exits with status 2, on



reply via email to

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