Mailing List Archive


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

Re: [tlug] stupid regex question




On Wed, 01 Oct 2003 17:21:35 +0900
Blomberg David <dblomber@example.com> wrote:

> 
> > > I'm trying to use this
> > > :%s/ +.*/$//g
> > 
> > Why do you need the '+'? Just this should work:
> > 
> > :%s/ .*$//g
> wouldn't this delete all lines in the file starting with a space rather
> than just the current one?


There is aren't any lines starting with spaces. It's actually an oracle
table defintion and there are lots lines like this.

USERNAME  VARCHAR(32)

so it gives

USERNAME



Just noticed my original had a typo in it

:%s/ +.*/$//g

I put an extra slash in it

:%s/ +.*$//g

I'm a bit better than that, really.


Brett





-- 
Brett Robson 
Systems Administrator
GOL 
http://www.gol.com
Phone: 03-3239-6856    International: +81-3-3239-6856


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links