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.