As it turns out, the regex example files in question were originally downloaded 
as part of a regex course module... and were in DOS format (something that 
didn't occur to me to even check).  After running dos2unix on them, the 
end-of-line anchor was recognized as expected.

This bug report can be closed.

Erich W. Wolz (wolz @ us.ibm.com), Senior IT Specialist
IBM Consulting - US Federal
12301 Kurland Dr., Houston, TX  77034-4812
Phone: 713-797-4645
________________________________
From: Paul Eggert <egg...@cs.ucla.edu>
Sent: Friday, January 19, 2024 11:37 PM
To: Sam James <s...@gentoo.org>; Erich Wolz <w...@us.ibm.com>
Cc: 68...@debbugs.gnu.org <68...@debbugs.gnu.org>
Subject: [EXTERNAL] Re: bug#68592: Grep 3.1 does not recognize regex 
beginning-of-line and end-of-line anchors (^ and $). on RHEL 8.9

On 2024-01-19 17:22, Sam James wrote:
> If you cannot reproduce this with the latest release of GNU grep (3.11),
> please report it to RHEL instead.
>
> It works OK for me with 3.11.

For what it works, it also works for me with grep 3.1 running on RHEL
8.5, in the C locale.

One possibility is that 'grep' is a user-interposed shell script that is
adding some options of some sort. Or perhaps the GREP_OPTIONS
environment variable is set to something squirrelly in the environment
(this environment variable was dropped in grep 3.6 partly because of bug
reports like this one).

The user can determine this by running the shell commands "type grep"
and "env" and inspecting their outputs.

Reply via email to