From owner-freebsd-bugs Mon Aug 7 19:56:49 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from ns.itga.com.au (ns.itga.com.au [202.53.40.210]) by hub.freebsd.org (Postfix) with ESMTP id 9BE9037B514 for ; Mon, 7 Aug 2000 19:56:45 -0700 (PDT) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20]) by ns.itga.com.au (8.9.3/8.9.3) with ESMTP id MAA66982; Tue, 8 Aug 2000 12:56:42 +1000 (EST) (envelope-from gnb@itga.com.au) Received: from itga.com.au (lightning.itga.com.au [192.168.71.20]) by lightning.itga.com.au (8.9.3/8.9.3) with ESMTP id MAA20948; Tue, 8 Aug 2000 12:56:42 +1000 (EST) Message-Id: <200008080256.MAA20948@lightning.itga.com.au> X-Mailer: exmh version 2.0.1 12/23/97 From: Gregory Bond To: clefevre@citeweb.net Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/20449: strange behaviour of sed 's/ */ /' w/ or w/o g In-reply-to: Your message of Tue, 08 Aug 2000 04:13:18 +0200. Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 08 Aug 2000 12:56:42 +1000 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > so, the right way to do what I want is something like sed 's/ \{1,\}/ /' or 's/ */ /' (that is ) (i.e. two spaces followed by 0 or more spaces). or 's/ */ /' () which is the same outcome but less efficient (because unlike the previous two versions this will match and replace single space characters). or or 's/ +/ /' in other applications (such as perl) that use egrep-like REs. Gotta love REs! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message