From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 8 17:46:16 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75C7716A425 for ; Mon, 8 Aug 2005 17:46:16 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B580743EBF for ; Mon, 8 Aug 2005 17:36:54 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j78Hasf9015596; Mon, 8 Aug 2005 10:36:54 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j78HarSZ015595; Mon, 8 Aug 2005 10:36:53 -0700 Date: Mon, 8 Aug 2005 10:36:53 -0700 From: Brooks Davis To: Jeremie Le Hen Message-ID: <20050808173653.GA1936@odin.ac.hmc.edu> References: <20050806125340.GA45385@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20050806125340.GA45385@obiwan.tataz.chchile.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-hackers@freebsd.org Subject: Re: sed s///i X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 17:46:16 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 06, 2005 at 02:53:40PM +0200, Jeremie Le Hen wrote: > Hi, >=20 > 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. >=20 > I'm not willing to implement this to conform to GNU sed(1), I just find > it very handy : >=20 > s/[Ff][Oo][Oo]/bar/ >=20 > would become >=20 > s/foo/bar/i >=20 > 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 --=20 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 --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC95giXY6L6fI4GtQRAjSrAKCs2Gw/41rZLSs9/N4erRZjuZvyQQCcCiDP e2Glkwm3sBVlC7HErnskXtg= =13C0 -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--