From owner-freebsd-questions Tue Nov 24 15:30:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA22459 for freebsd-questions-outgoing; Tue, 24 Nov 1998 15:30:16 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pau-amma.whistle.com (s205m64.whistle.com [207.76.205.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA22454 for ; Tue, 24 Nov 1998 15:30:14 -0800 (PST) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.9.1/8.9.1) id PAA10376; Tue, 24 Nov 1998 15:26:49 -0800 (PST) (envelope-from dhw) Date: Tue, 24 Nov 1998 15:26:49 -0800 (PST) From: David Wolfskill Message-Id: <199811242326.PAA10376@pau-amma.whistle.com> To: malartre@aei.ca, questions@FreeBSD.ORG Subject: Re: "vi" problem with search & replace (vi do not accept "/"). In-Reply-To: <365B4001.4EFA71EB@aei.ca> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Date: Tue, 24 Nov 1998 18:23:45 -0500 >From: Malartre >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. You need to "escape" the /: :%s/<\/TT><\/B><\/FONT>/<<\/COMMAND>>/g >Well, I don't know how to type a "/" without interfering with vi's /. It is common (in UNIX) to use \ as an "escape" mechanism. david -- David Wolfskill UNIX System Administrator dhw@whistle.com voice: (650) 577-7158 pager: (650) 371-4621 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message