OT: vim question

  • From: "Taylor, Chris David" <ChrisDavid.Taylor@xxxxxxxxxxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 15 Feb 2011 15:30:34 -0600

Ok I can't find it...

Where you're doing a search & replace, how do you keep from replacing the 
characters you're searching for:

I want this:

:1,$s/[0-9]/^M/  --- but this replaces whatever matches in 0-9 with a carriage 
return - I actually want it to not replace but insert a carriage return after 
finding the number string and keep the number.

Chris

Other related posts: