bug-grep
[Top][All Lists]
Advanced

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

pcregrep


From: Reuben Thomas
Subject: pcregrep
Date: Sun, 16 Jan 2011 23:03:44 +0000

I just had an email exchange with Phil Hazel, author of PCRE and
pcregrep, asking him what GNU grep now lacks that pcregrep offers,
with a view to making pcregrep redundant. He replied:

A quick glance at "man grep" (2.5.4 on a Gentoo Linux system)
shows up the following:

 1. It says grep -P is "highly experimental".

 2. GNU grep lacks --include-dir.

 3. GNU grep with -P doesn't have a means of setting certain
   PCRE-specific options such as -M, --match-limit, --recursion-limit.
   -M (multiline matching) is a rather different way of matching the
   text of a file.

 4. There's no mention of UTF-8 support in the GNU grep man page.

 5. There are some trivialities such as pcregrep's synonym of
   --word-regex for --word-regexp (but of course those are minor
   issues).

 6. There are surely other issues that I missed in a quick compare. In
   fact, I see that I have already documented some differences in the
   pcregrep man page (including those mentioned above). It says this:

      However, the --file-offsets,  --include-dir,  --line-offsets,
      --locale, --match-limit, -M, --multiline, -N, --newline, --recur-
      sion-limit, -u, and --utf-8 options are specific to pcregrep, as
      is the use of the --only-matching option with a capturing
      parentheses number.

Would it be worth adding this to the GNU grep TODO list? It would be
nice to make pcregrep redundant, as it's essentially a GNU grep clone
that uses PCRE, unlike some other grep implementations that have more
major differences.

-- 
http://rrt.sc3d.org



reply via email to

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