From owner-freebsd-questions Mon Nov 11 14:20: 3 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6637837B401 for ; Mon, 11 Nov 2002 14:20:02 -0800 (PST) Received: from beck.quonix.net (beck.quonix.net [64.239.136.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED57D43E6E for ; Mon, 11 Nov 2002 14:20:01 -0800 (PST) (envelope-from john@essenz.com) Received: from localhost (pcp01324074pcs.neave01.pa.comcast.net [68.81.22.158]) by beck.quonix.net (8.11.6/8.11.6) with ESMTP id gABMIkJ55687; Mon, 11 Nov 2002 14:18:46 -0800 (PST) (envelope-from john@essenz.com) Date: Mon, 11 Nov 2002 17:19:49 -0500 Subject: Re: awk to remove backet Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) Cc: questions@FreeBSD.ORG To: Benoit Lacherez From: John Von Essen In-Reply-To: <20021111225743.A7718@milouz.boece.foo> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.482) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Im confused. Wouldn't s/(\([^)]*\))/\1/g just replace exactly what it finds? I think the outer ()'s got mixed up. To take (hello) and change it to hello, you would do: sed 's/\(([\w]+)\)/\1/g' \w is fine if you only want the cases where text only is inside. -John Von Essen On Monday, November 11, 2002, at 04:57 PM, Benoit Lacherez wrote: > What about sed 's/(\([^)]*\))/\1/g' ? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message