[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

more OT: search-and-replace commands (was Re: OT: Why is C so popular?)



Steve Lamb wrote:
On Wed, 27 Aug 2003 16:17:30 +0200
Francois Bottin <fbottin@free.fr> wrote:

Quoting Ron Johnson <ron.l.johnson@cox.net>:

On Wed, 2003-08-27 at 06:34, Paul Johnson wrote:

Wouldn't it be easier to read if you wrote it s/C/Perl/ ?


So that it wouldn't change Choo-choo to Perlhoo-choo.  I wasn't
just thinking of that one paragraph...


Then: s/\bC\b/Perl/g ;-)
(Yes, I also added a g at the end to not only substitute the 1st occurence)


    Still doesn't work when sentences end in C.

Hahaha. It always amuses me whenever we have a thread about a particular topic, which refrences a particular search-and-replace command. Various other people reply and give examples with which the said search-and-replace command will not work; and then give their own versions of the command.

All that said, isn't there like a "One True Search-and-replace Command" which will handle all this weirdness of characters being at the start/middle/end of words which should not be replaced? This is just an informative question though (I hope it doesn't end like an unproductive Vi Vs. Emacs sort of discussion). =)

--
Harshwardhan Nagaonkar
Electrical Engineering Sysop
Brigham Young University - 84602



Reply to: