Date: Sat, 22 Nov 2003 13:29:47 +0000 From: Jez Hancock <jez.hancock@munk.nu> To: freebsd-questions@freebsd.org Subject: Re: newbie: use <CR> in RE? Message-ID: <20031122132947.GA43100@users.munk.nu> In-Reply-To: <3FBF5DEA.2030405@hotmail.com> References: <3FBF5DEA.2030405@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 22, 2003 at 09:00:26PM +0800, Zhang Weiwu wrote: <snip> > This is also a problem in vi(1). Besides <CR> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031122132947.GA43100>