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.
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
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
You're s close. :) The \{-} is a *replacement* for the
asterisk operator, not a
Hi,
Wolfgang Schmidt wrote:
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,