From owner-freebsd-questions@FreeBSD.ORG Sat Nov 22 05:29:52 2003 Return-Path: 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 8857116A4CE for ; Sat, 22 Nov 2003 05:29:52 -0800 (PST) Received: from munk.nu (mail.munk.nu [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8355943F85 for ; Sat, 22 Nov 2003 05:29:49 -0800 (PST) (envelope-from munk@munk.nu) Received: from munk by munk.nu with local (Exim 4.24; FreeBSD) id 1ANXpb-000BOQ-Q8 for freebsd-questions@freebsd.org; Sat, 22 Nov 2003 13:29:47 +0000 Date: Sat, 22 Nov 2003 13:29:47 +0000 From: Jez Hancock To: freebsd-questions@freebsd.org Message-ID: <20031122132947.GA43100@users.munk.nu> Mail-Followup-To: freebsd-questions@freebsd.org References: <3FBF5DEA.2030405@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FBF5DEA.2030405@hotmail.com> User-Agent: Mutt/1.4.1i Sender: User Munk Subject: Re: newbie: use in RE? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2003 13:29:52 -0000 On Sat, Nov 22, 2003 at 09:00:26PM +0800, Zhang Weiwu wrote: > This is also a problem in vi(1). Besides I wish to manipulate > tabstops and line-feeds with RE too. I'm not sure about vi, but in vim this works: :%s/\n// to remove all newlines throughout a document. To substitute all tabs in this text: one two three with newlines, one would do: :s/\t/\r/ on that line - using '\r' instead of '\n'. Not entirely sure why '\r' is used in this context instead of '\n'. -- Jez Hancock - System Administrator / PHP Developer http://munk.nu/