GNU bug report logs - #25499
[PATCH] grep: fix matching not longest pattern with grep -Fo

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Sat, 21 Jan 2017 09:16:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 25499 <at> debbugs.gnu.org
Subject: bug#25499: [PATCH] grep: fix matching not longest pattern with grep -Fo
Date: Sat, 21 Jan 2017 08:09:00 -0800
[Message part 1 (text/plain, inline)]
On Sat, Jan 21, 2017 at 1:14 AM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
> grep -Fo may not match longest pattern in grep 2.26 or later including
> current master.
>
> $ printf 'abce\n' > in
> $ printf 'abcd\nc\nbce\n' > pat
> $ LC_ALL=C src/grep -Fof pat in
> c
>
> We expect "bce" in this case.

Nice. I am glad you caught that.
I've adjusted some wording and will push this soon:
[grep-Fo-longest.diff (text/plain, attachment)]

This bug report was last modified 8 years and 202 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.