From owner-freebsd-current@FreeBSD.ORG Sun Nov 14 23:50:58 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 EE7F116A4E4 for ; Sun, 14 Nov 2004 23:50:54 +0000 (GMT) Received: from ns.nnt.ru (ns.nnt.ru [217.72.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7390243D46 for ; Sun, 14 Nov 2004 23:50:54 +0000 (GMT) (envelope-from nobody@ns.nnt.ru) Received: from drweb by ns.nnt.ru with drweb-scanned (Exim 3.36 #1) id 1CTU7n-000Hwg-00 for freebsd-current@freebsd.org; Mon, 15 Nov 2004 02:49:39 +0300 Received: from nobody by ns.nnt.ru with local (Exim 3.36 #1) id 1CTU7m-000HwR-00; Mon, 15 Nov 2004 02:49:38 +0300 Received: from mx2.freebsd.org ([216.136.204.119]) by ns.nnt.ru with esmtp (Exim 3.36 #1) id 1CTU7m-000HwL-00 for goblin@nnt.ru; Mon, 15 Nov 2004 02:49:38 +0300 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 1EAA15795E; Sun, 14 Nov 2004 23:48:53 +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 5BFC016A4EC; Sun, 14 Nov 2004 23:48:45 +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 A883D16A4CE; Sun, 14 Nov 2004 23:48:31 +0000 (GMT) Received: from bache.ece.cmu.edu (BACHE.ECE.CMU.EDU [128.2.129.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EAAB43D48; Sun, 14 Nov 2004 23:48:31 +0000 (GMT) (envelope-from allbery@ece.cmu.edu) Received: from [10.9.204.1] (dsl093-061-215.pit1.dsl.speakeasy.net [66.93.61.215]) by bache.ece.cmu.edu (Postfix) with ESMTP id BA8E582; Sun, 14 Nov 2004 18:48:28 -0500 (EST) From: "Brandon S. Allbery KF8NH" To: Zoltan Frombach In-Reply-To: References: Content-Type: text/plain Message-Id: <1100476106.10768.4.camel@rushlight.kf8nh.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 14 Nov 2004 18:48:27 -0500 Content-Transfer-Encoding: 7bit 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.662650, 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: Sun, 14 Nov 2004 23:51:01 -0000 On Sun, 2004-11-14 at 18:39, Zoltan Frombach wrote: > match anything! After spending like an hour investigating this, I realized > that the + after my bracket expression ( I'm talking about this part here: Normal. > According to the sed man page, the regexp syntax that is used by sed is > documented in the re_format man page. And according to the re_format man > page: "A piece is an atom possibly followed by a single= `*', `+', `?', or You need to read it more carefully. There are two kinds of regular expressions, "basic" and "extended". sed, ed, and grep speak BRE syntax, whereas awk and egrep speak ERE syntax. + is special only in ERE syntax. (And then there's GNU, where the difference between BRE and ERE is that some things use a preceding backslash in BRE and don't in ERE, and vice versa, so GNU sed does what you want if you use \+ instead of +.) -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon univ. KF8NH _______________________________________________ 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"