|
From: | Paolo Bonzini |
Subject: | Re: How to use \Q \E in GREP in a case-insensitive way? |
Date: | Thu, 26 Aug 2010 10:33:11 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5 |
On 08/25/2010 05:02 PM, Stormy wrote:
however, when I try to make grep match in a case-insensitive way, using -i flag there are no matches, here's an example: 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 rather stay with grep than to switch to perl or parsing the large files manually.
I think this is unexpected behavior of PCRE, not grep. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |