A vi question
Karl F. Larsen
klarsen1 at gmail.com
Tue Sep 8 21:46:55 UTC 2009
stan wrote:
> On Tue, Sep 08, 2009 at 03:20:06PM -0400, Brian McKee wrote:
>> On Tue, Sep 8, 2009 at 2:35 PM, stan<stanb at panix.com> wrote:
>>> vi is a continuing learning experinece :-)
>> Until the day I die I expect :-)
>>
>>> :.,$s/^*OTE/OTE/
>>> But * is not the appropriate wildcard here in vi.
>> As Rashkae pointed out - .* not just *
>>
>> But your data had TWO 'OTE' strings in it.
>> Do you need the first one or the last one? As shown it's the last one
>> you'll get.
>> If you want only up to the first one (non-greedy) try
>> :.,$s/^.\{-}OTE/OTE/
>>
> OH cool tht helps, thanks.
>
> What does the \{-} syntax mean?
>
>
I have an alfa version of 9.10 installed on my laptop. The reason is to
check if the bug I and others found on 9.04 is still present.
But I discovered that vi in a terminal brings up vim with some good
help on the screen. Alas I'm a joe user, and pleased to see that 9.10
has joe to install.
73 Karl
--
Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
Key ID = 3951B48D
More information about the ubuntu-users
mailing list