Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Aug 2005 14:53:40 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        freebsd-hackers@FreeBSD.org
Subject:   sed s///i
Message-ID:  <20050806125340.GA45385@obiwan.tataz.chchile.org>

next in thread | raw e-mail | index | archive | help
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 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.

Regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050806125340.GA45385>