On 16/08/06, Wolfgang Schmidt <[EMAIL PROTECTED]> wrote:
    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

Try:

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

Non-greedy is \{-}, not *\{-}.

Al

Reply via email to