bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep: -i option not working i cronjobs


From: Tim Waugh
Subject: Re: grep: -i option not working i cronjobs
Date: Fri, 12 Nov 2004 09:25:28 +0000
User-agent: Mutt/1.4.1i

On Thu, Nov 11, 2004 at 10:16:10PM -0400, Tony Abou-Assaleh wrote:

> I can see at least 2 possible approaches:
> 
> 1) Have 2 buffers, original and TOLOWERCASE'ed, and when printing the
> output, print it from the original buffer
> 2) convert the regular expression to match both cases for any literals
> simply by expanding each alphabetic symbol to a character class of it's
> lowercase and upper case forms: e.g, 'a' -> '[aA]', 'B'-> '[bB]', etc.
> 
> My guess is that for most cases, the second solution would be faster. But
> that's just a semi-educated guess at the moment. Does anyone know better?

There is a 3rd approach which hopefully we will use longer-term:

3) upgrade to a newer regex.c and just set REG_ICASE when -i is used

Tim.
*/

Attachment: pgpdd2YOomVtp.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]