bug-gnulib
[Top][All Lists]
Advanced

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

Re: regex documentation


From: Bruno Haible
Subject: Re: regex documentation
Date: Wed, 11 May 2022 04:10:57 +0200

Paul Eggert wrote:
> Oh my. For years I thought that gnulib/doc/regex.texi documents the 
> regular expressions supported by glibc (and by Gnulib, which mimics 
> glibc). Unfortunately it appears that I am wrong, and it's documentation 
> for the old GNU regex package (however, with some edits by me that are 
> appropriate only for glibc!).

Indeed, when I added regex.texi to the Gnulib documentation in 2010
(from the GNU regex 0.12 package, that was on http://ftp.gnu.org/old-gnu/
already at that time), Gnulib had already switched to the regex from glibc
- that was in 2005. I wasn't aware that there were significant differences.

> Does anybody use gnulib/doc/regex.texi?

It is part of the Gnulib documentation [1]. I like it, in particular, because
it presents the regular expression syntax as supported by GNU programs
in an end-user centric way (what is the syntax for equivalence classes?
what does \b mean? etc). Whereas
  - the glibc documentation [2] describes only the programmer's perspective,
  - POSIX [3] does not cover the GNU extensions,
  - The Linux manpage [4] does not cover the GNU extensions either,
  - The grep documentation [5] describes only the end-user's perspective,
    and references also PCRE.
  - The ed documentation [6] and the sed documentation [7] also describe
    only the end-user's perspective.

> If not, I suggest we remove it from Gnulib. It's not part of any
> package, and its presence is confusing both Rueben and me.

I'd suggest to keep it. If we don't have time for a deep overhaul: please
just tell me which nodes of [1] have inaccurate information, and I'll add a
big warning "Note: The information on this page is out-of-date!" in each.

Further updates can then occur by whoever has time to look into it.

Bruno

[1] 
https://www.gnu.org/software/gnulib/manual/html_node/Regular-expressions.html
[2] https://www.gnu.org/software/libc/manual/html_node/Regular-Expressions.html
[3] 
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/V1_chap09.html
[4] https://man7.org/linux/man-pages/man7/regex.7.html
[5] https://www.gnu.org/software/grep/manual/html_node/Regular-Expressions.html
[6] https://www.gnu.org/software/ed/manual/ed_manual.html#Regular-expressions
[7] 
https://www.gnu.org/software/sed/manual/html_node/sed-regular-expressions.html






reply via email to

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