From owner-freebsd-questions Wed Nov 25 05:18:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA03296 for freebsd-questions-outgoing; Wed, 25 Nov 1998 05:18:35 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from horton.iaces.com (horton.iaces.com [204.147.87.98]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA03291 for ; Wed, 25 Nov 1998 05:18:31 -0800 (PST) (envelope-from proot@horton.iaces.com) Received: (from proot@localhost) by horton.iaces.com (8.8.8/8.8.8) id HAA10956; Wed, 25 Nov 1998 07:18:20 -0600 (CST) (envelope-from proot) From: "Paul T. Root" Message-Id: <199811251318.HAA10956@horton.iaces.com> Subject: Re: "vi" problem with search & replace (vi do not accept "/"). In-Reply-To: <365B4001.4EFA71EB@aei.ca> from Malartre at "Nov 24, 98 06:23:45 pm" To: malartre@aei.ca (Malartre) Date: Wed, 25 Nov 1998 07:18:20 -0600 (CST) Cc: questions@FreeBSD.ORG X-Organization: USWEST !nterprise Networking - ACES X-Phone: (612) 664-3385 X-Fax: (612) 664-4779 X-Page: (800) SKY-PAGE PIN: 537-7270 X-Address: 600 Stinson Blvd, Fl 1S X-Address: Minneapolis, MN 55413 X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Put a \ in front of every / :%s/<\/TT><\/B><\/FONT>/<<\/COMMAND>>/g Or, I think you can substitute a different character for the / in the vi command. :%s!!<>!g In a previous message, Malartre said: > This is not FreeBSD specific, but I guess someone could give me the > trick: > I want to "search & replace" the sentence "" with > "<>". > > :%s//<>/g > > But that give me an error (has I expected, because of the "/" in those > HTML tags. > > Usage: [line [,line]] s [[/;]RE[/;]repl[/;] [cgr] [count] [#lp]]. > > Well, I don't know how to type a "/" without interfering with vi's /. > > Thank you > -- > [Malartre][malartre@aei.ca][http://www.lowrent.org/freebsd/malartre/] > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- The best cure for insomnia is to get a lot of sleep. -- W. C. Fields To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message