Date: Tue, 08 Aug 2000 12:56:42 +1000 From: Gregory Bond <gnb@itga.com.au> To: clefevre@citeweb.net Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/20449: strange behaviour of sed 's/ */ /' w/ or w/o g Message-ID: <200008080256.MAA20948@lightning.itga.com.au> In-Reply-To: Your message of Tue, 08 Aug 2000 04:13:18 %2B0200.
next in thread | raw e-mail | index | archive | help
> so, the right way to do what I want is something like sed 's/ \{1,\}/ /' or 's/ */ /' (that is <space><space><space><star>) (i.e. two spaces followed by 0 or more spaces). or 's/ */ /' (<space><space><star>) 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008080256.MAA20948>