From owner-freebsd-current@FreeBSD.ORG Mon Nov 15 02:20:54 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B328616A4CE for ; Mon, 15 Nov 2004 02:20:54 +0000 (GMT) Received: from ns.nnt.ru (ns.nnt.ru [217.72.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 655C243D1D for ; Mon, 15 Nov 2004 02:20:54 +0000 (GMT) (envelope-from nobody@ns.nnt.ru) Received: from drweb by ns.nnt.ru with drweb-scanned (Exim 3.36 #1) id 1CTWPU-000BWY-00 for freebsd-current@freebsd.org; Mon, 15 Nov 2004 05:16:04 +0300 Received: from nobody by ns.nnt.ru with local (Exim 3.36 #1) id 1CTWPT-000BWB-00; Mon, 15 Nov 2004 05:16:03 +0300 Received: from mx2.freebsd.org ([216.136.204.119]) by ns.nnt.ru with esmtp (Exim 3.36 #1) id 1CTWPT-000BVt-00 for goblin@nnt.ru; Mon, 15 Nov 2004 05:16:03 +0300 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 0C8E457B7F; Mon, 15 Nov 2004 02:14:59 +0000 (GMT) (envelope-from owner-freebsd-stable@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 51AAD16A4F2; Mon, 15 Nov 2004 02:14:53 +0000 (GMT) Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE12816A4CE; Mon, 15 Nov 2004 02:11:18 +0000 (GMT) Received: from hotmail.com (bay2-dav16.bay2.hotmail.com [65.54.246.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99F9F43D49; Mon, 15 Nov 2004 02:11:18 +0000 (GMT) (envelope-from tssajo@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 14 Nov 2004 18:11:17 -0800 Received: from 24.24.201.219 by BAY2-DAV16.phx.gbl with DAV; Mon, 15 Nov 2004 02:10:37 +0000 X-Originating-IP: [24.24.201.219] X-Originating-Email: [tssajo@hotmail.com] X-Sender: tssajo@hotmail.com From: "Zoltan Frombach" To: "Maxime Henrion" References: <1100476106.10768.4.camel@rushlight.kf8nh.com> <20041115014221.GF32839@elvis.mu.org> Date: Sun, 14 Nov 2004 18:10:40 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: X-OriginalArrivalTime: 15 Nov 2004 02:11:17.0798 (UTC) FILETIME=[6440D460:01C4CAB8] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Errors-To: owner-freebsd-stable@freebsd.org X-bogoflag: true X-2Bogosity: No, tests=bogofilter, spamicity=0.686832, version=0.92.8 cc: freebsd-current@freebsd.org cc: freebsd-stable@freebsd.org Subject: Re: Either I do something wrong or there is a regexp bug in sed !! X-BeenThere: freebsd-current@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 02:20:54 -0000 Thanks. I will not use the -E flag then. Zoltan > Zoltan Frombach wrote: >> You are right. My mistake. This indeed works: >> >> sed -E -e "s/^[0-9]+/199/" conf-split > conf-split.new >> >> Thanks for clearing this up. > > For what it's worth, there is another way to write this regexp without > using the -E flag. Since x+ == xx*, you can write it: > "s/^[0-9][0-9]*/199/". The reason for not using -E is that it's not > portable, since it's not specified by the standard. GNU sed uses -r for > extended REs. > > Cheers, > Maxime _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"