Hello,

Christian Brabandt wrote on 22.12.09:
> On Tue, December 22, 2009 10:35 am, epanda wrote:
> > I detect the first column of a csv file like that.
> >
> > ^\([^;]\+\);
> >
> >
> > I would like to search in the match string those which contains
> > spaces.
 
> ^\([^; ]*\)\s[^;]*;

Could you explain these regexes? I reckon that 

^\([^;]\+\);

Means: at least once anything but a semicolon at the beginning of a line and
then a semicolon. (But why the grouping \(...\)?)

But in Christians enhancement ^\([^; ]*\)\s[^;]*; I am confused: i read it as:


^\([^; ]*\)     One or more times a semicolon followed by a space 
\s[^;]*         and followed by another whitespace and anything but a semicolon 
                zero or more times
;               and then a semicolon


I think this is not quite right...

jan

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to