[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] grep: properly handle grep -w "^str"
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2014-02-07 16:16:16
Message-ID: CAK1hOcNoXy=jXncU2oD__KH3W3qJ2gGqvBPqbNC5JoWFFngEZw () mail ! gmail ! com
[Download RAW message or body]
On Fri, Feb 7, 2014 at 3:26 PM, Bartosz Go=B3aszewski
<bartekgola@gmail.com> wrote:
> 2014-02-07 Denys Vlasenko <vda.linux@googlemail.com>:
>> On Thu, Feb 6, 2014 at 9:34 PM, Bartosz Golaszewski
>> <bartekgola@gmail.com> wrote:
>>> Pass the REG_NOTBOL flag to subsequent regexec calls.
>>
>> Which use case it fixes?
>> I would like to add it to testsuite.
>
> It's already there:
>
> testing "grep -w ^str doesn't match str not at the beginning" \
> "grep -w ^str input" \
> "" \
> "strstr\n" \
> ""
>
> and
>
> commit cd55f2d9332489432ba2b3093903949c6c2e3e33
> Author: Denys Vlasenko <vda.linux@googlemail.com>
> Date: Tue Jan 7 14:57:42 2014 +0100
>
> grep: fix two bugs with -w
>
> Unfortunately, with +!EXTRA_COMPAT, "grep -w ^str" still
> erroneously matches "strstr".
A closely related case is still broken:
echo 'komkom' | busybox grep -w kom
This should not match... I'm fixing it too.
Try current git.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic