On Sat, Aug 06, 2005 at 02:53:40PM +0200, Jeremie Le Hen wrote:
> Hi,
> 
> I would like to implement the 'i' flag for the 's' command in sed(1).
> This flag would mean that the match must be case insensitive.
> 
> I'm not willing to implement this to conform to GNU sed(1), I just find
> it very handy :
> 
>       s/[Ff][Oo][Oo]/bar/
> 
> would become
> 
>       s/foo/bar/i
> 
> Before I start modifying the code, I would like if it is something that
> has chances to get commited or not, although SUSv3 doesn't talk about
> this flag.

I can't see any harm in implementing this.  Anyone trying to make an "i"
flag mean anything else would be taken out and shot. :)

> I also need to add that this change would be a little intrusive in the
> code.  Actually the regular expression gets compiled, then the
> substitute string and finally flags are handled.  Thus this would
> require scanning flags before compiling the regular expression.

Are there any test cases out there for sed RE handling?  If not, I'd
suggest this would be a good time to create some to help insure this
change maintains correctness.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

Attachment: pgpawrRaRb1p1.pgp
Description: PGP signature

Reply via email to