Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2000 12:48:18 GMT
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        Edwin Groothuis <mavetju@chello.nl>, Richard Schuder <rschuder@coolwave.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Replacing text with forward slash in vi
Message-ID:  <E148ifK-0003b0-00@post.mail.nl.demon.net>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E148ifK-0003b0-00>