coreutils
[Top][All Lists]
Advanced

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

Re: What type of regex is used by `tac` command?


From: Pádraig Brady
Subject: Re: What type of regex is used by `tac` command?
Date: Wed, 27 Apr 2022 15:27:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0

On 27/04/2022 09:33, Emily Seville wrote:
What type of regex is used by `tac` command? BRE/ERE or another flavour?

coreutils uses BRE throughout.

We should document this in the man pages and info docs.
I'll follow up with a patch to do that.

cheers,
Pádraig

For my reference...

$ git grep RE_SYNTAX
src/csplit.c:    RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & 
~RE_NO_EMPTY_RANGES;
src/expr.c:    RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & 
~RE_NO_EMPTY_RANGES;
src/nl.c:        RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & 
~RE_NO_EMPTY_RANGES;

We should explicitly set re_syntax_options in tac.c also for consistency.




reply via email to

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