grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v3.11-48-g7ddaa55


From: Paul Eggert
Subject: grep branch, master, updated. v3.11-48-g7ddaa55
Date: Sat, 14 Dec 2024 16:15:07 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  7ddaa55cabc9b6f5947e27ce4a8eb0770628d7a2 (commit)
       via  eaca8698225c65b56e83b9390e1c3c9fbdc9acd0 (commit)
      from  29a9b72db3e1296c8eaf8365b81c72b5456680e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=7ddaa55cabc9b6f5947e27ce4a8eb0770628d7a2


commit 7ddaa55cabc9b6f5947e27ce4a8eb0770628d7a2
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Dec 14 13:44:46 2024 -0700

    doc: improve -P discussion
    
    * doc/grep.texi (grep Programs): Improve discussion of how grep -P
    differs from Perl.

diff --git a/doc/grep.texi b/doc/grep.texi
index bfcba7e..53c715a 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -1155,25 +1155,28 @@ Interpret patterns as fixed strings, not regular 
expressions.
 @opindex --perl-regexp
 @cindex matching Perl-compatible regular expressions
 Interpret patterns as Perl-compatible regular expressions (PCREs).
-PCRE support is here to stay, but consider this option experimental when
-combined with the @option{-z} (@option{--null-data}) option, and note that
-@samp{grep@ -P} may warn of unimplemented features.
 @xref{Other Options}.
 
 For documentation, refer to @url{https://www.pcre.org/}, with these caveats:
 @itemize
+@item
+In a UTF-8 locale, Perl treats data as UTF-8 only under certain
+conditions, e.g., if @command{perl} is invoked with the @option{-C}
+option or the @env{PERL_UNICODE} environment variable set appropriately.
+In contrast, in a UTF-8 locale @command{grep} always treats data as UTF-8.
+
 @item
 Although PCRE tracks the syntax and semantics of Perl's regular
-expressions, the match is not always exact.  For example, Perl
+expressions, the match is not always exact.  Perl
 evolves and a Perl installation may predate or postdate the PCRE2
 installation on the same host, or their Unicode versions may differ,
 or Perl and PCRE2 may disagree about an obscure construct.
 
-For example, @samp{\d} ordinarily is like @samp{\p@{Nd@}} and matches
-all decimal digits, whereas @samp{[0-9]} matches only ASCII digits.
-PCRE2 versions after 10.42 let you change this behavior: in a regular
+For example, @samp{\d} ordinarily is like
+@samp{\p@{General_Category: Decimal_Number@}} and matches all decimal digits,
+whereas @samp{[0-9]} matches only ASCII digits.
+PCRE2 versions 10.43 and later let you change this behavior: in a regular
 expression that starts with @samp{(?aD)}, @samp{\d} is like @samp{[0-9]}.
-However, PCRE2 10.42 and earlier do not support @samp{(?aD)}.
 
 @item
 By default, @command{grep} applies each regexp to a line at a time,

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=eaca8698225c65b56e83b9390e1c3c9fbdc9acd0


commit 7ddaa55cabc9b6f5947e27ce4a8eb0770628d7a2
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Dec 14 13:44:46 2024 -0700

    doc: improve -P discussion
    
    * doc/grep.texi (grep Programs): Improve discussion of how grep -P
    differs from Perl.

diff --git a/doc/grep.texi b/doc/grep.texi
index bfcba7e..53c715a 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -1155,25 +1155,28 @@ Interpret patterns as fixed strings, not regular 
expressions.
 @opindex --perl-regexp
 @cindex matching Perl-compatible regular expressions
 Interpret patterns as Perl-compatible regular expressions (PCREs).
-PCRE support is here to stay, but consider this option experimental when
-combined with the @option{-z} (@option{--null-data}) option, and note that
-@samp{grep@ -P} may warn of unimplemented features.
 @xref{Other Options}.
 
 For documentation, refer to @url{https://www.pcre.org/}, with these caveats:
 @itemize
+@item
+In a UTF-8 locale, Perl treats data as UTF-8 only under certain
+conditions, e.g., if @command{perl} is invoked with the @option{-C}
+option or the @env{PERL_UNICODE} environment variable set appropriately.
+In contrast, in a UTF-8 locale @command{grep} always treats data as UTF-8.
+
 @item
 Although PCRE tracks the syntax and semantics of Perl's regular
-expressions, the match is not always exact.  For example, Perl
+expressions, the match is not always exact.  Perl
 evolves and a Perl installation may predate or postdate the PCRE2
 installation on the same host, or their Unicode versions may differ,
 or Perl and PCRE2 may disagree about an obscure construct.
 
-For example, @samp{\d} ordinarily is like @samp{\p@{Nd@}} and matches
-all decimal digits, whereas @samp{[0-9]} matches only ASCII digits.
-PCRE2 versions after 10.42 let you change this behavior: in a regular
+For example, @samp{\d} ordinarily is like
+@samp{\p@{General_Category: Decimal_Number@}} and matches all decimal digits,
+whereas @samp{[0-9]} matches only ASCII digits.
+PCRE2 versions 10.43 and later let you change this behavior: in a regular
 expression that starts with @samp{(?aD)}, @samp{\d} is like @samp{[0-9]}.
-However, PCRE2 10.42 and earlier do not support @samp{(?aD)}.
 
 @item
 By default, @command{grep} applies each regexp to a line at a time,

-----------------------------------------------------------------------

Summary of changes:
 NEWS                    |  8 ++++++++
 doc/grep.texi           | 20 +++++++++++---------
 src/pcresearch.c        | 23 ++++-------------------
 tests/pcre-ascii-digits | 20 ++++++++++----------
 tests/pcre-utf8-w       |  2 --
 5 files changed, 33 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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