Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2000 13:45:28 +0100
From:      Edwin Groothuis <mavetju@chello.nl>
To:        Richard Schuder <rschuder@coolwave.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Replacing text with forward slash in vi
Message-ID:  <20001220134528.D59674@d9168.upc-d.chello.nl>
In-Reply-To: <NEBBIIEFELBNMFEGKECBMEMFCBAA.rschuder@coolwave.net>; from rschuder@coolwave.net on Wed, Dec 20, 2000 at 04:36:52AM -0800
References:  <NEBBIIEFELBNMFEGKECBMEMFCBAA.rschuder@coolwave.net>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001220134528.D59674>