Szerző: Philip Hazel Dátum: Címzett: Stormy CC: Paolo Bonzini, grep help, pcre-dev Tárgy: Re: [pcre-dev] How to use \Q \E in GREP in a case-insensitive way?
On Fri, 27 Aug 2010, Stormy wrote:
> How do I submit a bug so this gets fixed? As you can see, workaround inside perl directly works fine:
>
> # echo TesT | perl -ne '/\Qtest\E/ and print'
> # echo TesT | perl -ne '/\Qtest\E/i and print'
> TesT
You need to get your grep fixed. This is not a bug in PCRE or pcregrep.
In my version of grep (on Gentoo Linux) it also works:
$ echo teST | pcregrep -i '\Qtest\E'
teST
$ echo teST | grep -iP '\Qtest\E'
teST
My grep is GNU grep 2.5.4. I assume it's using the installed PCRE
library, which is 7.9. Check that you are using the latest releases of
grep and the PCRE library. If you are, complain to the maintainers of
grep. If not, try to update.