|
From: | Elliott Hughes |
Subject: | [bug-grep] Re: grep: -i option not working i cronjobs |
Date: | Sun, 14 Nov 2004 09:59:41 -0800 |
On Nov 12, 2004, at 01:54, Aharon Robbins wrote:
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 usedMy problem with REG_ICASE is that it's a regex-compile-time bit. I'd rather it be a regex-execute-time bit, since in gawk the use of IGNORECASE can be changed around dynamically.
why do you favor that interpretation? when i've faced a similar dilemma in the past, i've decided that (to use Perl-compatible syntax), prepending "(?i)" is an appropriate interpretation of "-i". my argument being that it's (a) easy to explain, and (b) doesn't unnecessarily take away the ability to have case-sensitive subexpressions.
presumably your argument is that if "-i" is equivalent to prepending "(?i)", there's no trivial way to take an arbitrary regular expression and disable any "(?i)"/"(?-i)" subexpressions.
i think both are perfectly reasonable interpretations in the absence of any overriding reason to favor one or the other, so i'd be interested to know if you have a strong argument in favor of the interpretation you describe.
-- http://www.jessies.org/~enh/
[Prev in Thread] | Current Thread | [Next in Thread] |