Hi vimmers,

I'm trying to do a regexp replacement. My original line is

ignore MATCH1 ignore_again MATCH2

I want to match MATCH1 and MATCH2, so here's my trial:

s/^ignore \(.*\{-}\) .*\{-} \(.*\)/matched:\1,\2/gc

I tried to use \{-} to make the ".*" match non-greedy, but I get E62 and E476.

Of course there are other ways to match the capitalized words, like \S or something similar,
but I'd like to know how to use non-greedy matching here.

Thanx in advance

   Wolfgang

Reply via email to