Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2002 17:19:49 -0500
From:      John Von Essen <john@essenz.com>
To:        Benoit Lacherez <blacherez@ac-bordeaux.fr>
Cc:        questions@FreeBSD.ORG
Subject:   Re: awk to remove backet
Message-ID:  <B17BFFD2-F5C3-11D6-AC50-0003933DDCFA@essenz.com>
In-Reply-To: <20021111225743.A7718@milouz.boece.foo>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B17BFFD2-F5C3-11D6-AC50-0003933DDCFA>