Friday, January 8, 2010

Re: Don't understand why detecting ^; or ;; is not working

Hi epanda!

On Do, 07 Jan 2010, epanda wrote:

> Hi,
>
>
> I have a script that should detect blank fields of csv file.
>
> ;foo;bar ===>1
> or
> foo;;bar ===>2
>
>
>
> Why this pattern does not work ?
>
> exec ".g/;;\|^;/

You mean :g/;;\|^;/

This works as intended and prints all the lines that match your pattern
(implicit action, since you did not specify one). The question is, what
would you like to do in these lines. Note you do not need exec for that.

regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
56. You leave the modem speaker on after connecting because you think it
sounds like the ocean wind...the perfect soundtrack for "surfing the net".

No comments: