From owner-freebsd-questions Wed Dec 20 4:48:26 2000 From owner-freebsd-questions@FreeBSD.ORG Wed Dec 20 04:48:24 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id D944937B402 for ; Wed, 20 Dec 2000 04:48:23 -0800 (PST) Received: from [195.11.243.26] (helo=Debug) by post.mail.nl.demon.net with smtp (Exim 3.14 #4) id 148ifK-0003b0-00; Wed, 20 Dec 2000 12:48:18 +0000 To: Edwin Groothuis , Richard Schuder , freebsd-questions@FreeBSD.ORG From: Cliff Sarginson Subject: Re: Replacing text with forward slash in vi Date: Wed, 20 Dec 2000 12:48:18 GMT X-Mailer: www.webmail.nl.demon.net X-Sender: postmaster@btvs.demon.nl X-Originating-IP: 192.250.24.58 Message-Id: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You don;t need all these backslashes.. you can use various characters as the string delimiters .. better solution unless you like going cross-eyed ! Cliff > On Wed, Dec 20, 2000 at 04:36:52AM -0800, Richard Schuder wrote: > > Here's a tough one! > > > > I want to replace the two dots ``..'' with a URL address like > > ``http://website.address.com'' in the following text: > > > > "../path/to/website/index.html" > > > > The vi command would be... > > > > :s/\../http://website.address.com > > > > but, the two forward slashes following "http:" confuse vi's replace command. > > Just escape them like you did with the dots: > > :s/\.\./http:\/\/website.address.com > > Edwin > > -- > Edwin Groothuis | Interested in MUDs? Visit Fatal Dimensions: > mavetju@chello.nl | http://fataldimensions.nl.eu.org/ > ------------------+ telnet://fataldimensions.nl.eu.org:4000 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message