Szerző: Paolo Bonzini Dátum: Címzett: Stormy CC: pcre-dev Tárgy: Re: [pcre-dev] How to use \Q \E in GREP in a case-insensitive way?
On 08/26/2010 01:09 PM, Stormy wrote: > PCRE developers,
>
> Can you comment on why grep/PCRE behave in that unexpected way?
For the record, the bug (or unexpected behavior) seems to be that text
within \Q...\E does not obey PCRE_CASELESS.
>>> sh-3.2# echo "TeST" | grep -P '\QTeST\E' ==> Match, expected
>> TeST
>>> sh-3.2# echo "TeST" | grep -iP '\Qtest\E' ==> No match, UNEXPECTED
>>>
>>> I would expect the last example to match, since the -i flag was
>>> passed.
>>
>> I think this is unexpected behavior of PCRE, not grep.