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