From owner-freebsd-questions Wed Dec 20 4:45:32 2000 From owner-freebsd-questions@FreeBSD.ORG Wed Dec 20 04:45:29 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from d9168.upc-d.chello.nl (d9168.upc-d.chello.nl [213.46.9.168]) by hub.freebsd.org (Postfix) with ESMTP id 7451B37B402 for ; Wed, 20 Dec 2000 04:45:29 -0800 (PST) Received: by d9168.upc-d.chello.nl (Postfix, from userid 1001) id 4C4E5141; Wed, 20 Dec 2000 13:45:28 +0100 (CET) Date: Wed, 20 Dec 2000 13:45:28 +0100 From: Edwin Groothuis To: Richard Schuder Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Replacing text with forward slash in vi Message-ID: <20001220134528.D59674@d9168.upc-d.chello.nl> Mail-Followup-To: Edwin Groothuis , Richard Schuder , freebsd-questions@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rschuder@coolwave.net on Wed, Dec 20, 2000 at 04:36:52AM -0800 Sender: edwin@d9168.upc-d.chello.nl Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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