[comp.unix.questions] Turning the into an

0004068145@mcimail.com (Ari Kahan) (12/07/90)

>joshi@motcid.UUCP (Abhay B. Joshi) writes:
>> I have a simple text-file containing the following text (3 lines):
>>
>>      The goal:
>>      All I am trying to do is replace the 'the's by 'an's.
>>      That's all.

ANNOUNCING:  (drum roll....)  THE *SLICK* WAY TO DO THIS IN VI!

:g/\<the\>/s//an/g

This will not turn theatre into anatre, or Xanthe into Xthean.

--Ari Kahan
(I can't afford a nifty signature-thingie).
 

gpvos@cs.vu.nl (Gerben 'P' Vos) (12/12/90)

0004068145@mcimail.com (Ari Kahan) writes:
>joshi@motcid.UUCP (Abhay B. Joshi) writes:

>> I have a simple text-file containing the following text (3 lines):
>>
>>      The goal:
>>      All I am trying to do is replace the 'the's by 'an's.
>>      That's all.

>:g/\<the\>/s//an/g

If that's all, why not do it simpler:

:%s/\<the\>/an/g

-					Gerben.
--
--- Gerben Vos - Aconet: BIGBEN!Gerben Vos - Internet: gpvos@cs.vu.nl
"While you are here, your wives and girlfriends are dating handsome American
 movie and TV stars. Stars like Tom Selleck, Bruce Willis, and Bart Simpson."
                                -- Baghdad Betty