Xref: utzoo comp.unix.misc:695 comp.unix.questions:27461 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!wuarchive!rex!uflorida!haven!umbc3!math13.math.umbc.edu!rouben From: rouben@math13.math.umbc.edu (Rouben Rostamian) Newsgroups: comp.unix.misc,comp.unix.questions Subject: Re: A question on .exrc while using vi Keywords: exrc vi Message-ID: <4643@umbc3.UMBC.EDU> Date: 9 Dec 90 16:11:34 GMT References: <5315@graphite20.UUCP> <1990Dec9.033641.9731@csn.org> Sender: newspost@umbc3.UMBC.EDU Reply-To: rouben@math13.math.umbc.edu.UUCP (Rouben Rostamian) Organization: Mathematics Department University of Maryland, Baltimore County Lines: 23 A long, long time ago someone wanted help with: >>> All I am trying to do is replace the 'the's by 'an's. >>> That's all. There have been several cycles of wrong or partially wrong solutions followed by the right solution. I am sure that the original poster has lost interest in these followups, however since it appears that we are at the beginning of a new cycle of Rube Goldberg-ish solutions, I feel that I should remind those who have not been paying attention that the correct solution is: :%s/\/an/g The regular expression \ picks up the pattern "the" delimited by whitespace or "the" at the beginning or end of lines. Therefore "theatre" does not change into "anatre". Let's see if this ends the debate. -- Rouben Rostamian Telephone: (301) 455-2458 Department of Mathematics and Statistics e-mail: University of Maryland Baltimore County bitnet: rostamian@umbc Baltimore, MD 21228, U.S.A. internet: rostamian@umbc3.umbc.edu