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

next in thread | raw e-mail | index | archive | help
> 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.
> 
> Any ideas?
> 
> 
use another delimiter, and eascape both "."s

try ...

:s;\.\.;http://website.address.com;

Cliff



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?E148iaj-0003Qv-00>