[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug on {,} : result of {,10} compar to {5,10},
From: |
Eric Blake |
Subject: |
Re: bug on {,} : result of {,10} compar to {5,10}, |
Date: |
Thu, 18 Apr 2013 10:54:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/18/2013 10:46 AM, Paul Eggert wrote:
> On 04/18/13 08:24, Eric Blake wrote:
>> {,10} is therefore undefined by POSIX.
>
> It is defined in the grep manual (in the
> node Fundamental Structure), as being
> equivalent to {0,10}, so there does appear
> to be a bug here.
Indeed, we have changed behavior over time; my Fedora 18 box has nicer
behavior:
$ rpm -q grep
grep-2.14-1.fc18.x86_64
$ echo guillaumeeeeeeeguillaume | grep -E "guillaume{,10}gui"
guillaumeeeeeeeguillaume
Guillaume was using grep 2.6.3 on Cygwin. I don't directly see it in
grep's NEWS, although one of these two releases is probably responsible:
2.12:
grep -E 'a{1000000000}' now reports an overflow error rather than
silently acting like grep -E 'a\{1000000000}'.
2.7:
X{0,0} is implemented correctly. It used to be a synonym of X{0,1}.
[bug present since "the beginning"]
At this point, it might be worth asking the Cygwin folks to package a
newer grep, to pick up this (and other) fixes, but there's nothing to do
upstream, unless we want to improve old NEWS entries.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug on {,} : result of {,10} compar to {5,10},, Guillaume Moulard, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},, Eric Blake, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},, Paul Eggert, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},,
Eric Blake <=
- Re: bug on {,} : result of {,10} compar to {5,10},, Paul Eggert, 2013/04/18
- Re: bug on {,} : result of {,10} compar to {5,10},, Guillaume Moulard, 2013/04/19
- Prev by Date:
Re: bug on {,} : result of {,10} compar to {5,10},
- Next by Date:
Re: bug on {,} : result of {,10} compar to {5,10},
- Previous by thread:
Re: bug on {,} : result of {,10} compar to {5,10},
- Next by thread:
Re: bug on {,} : result of {,10} compar to {5,10},
- Index(es):