Sunday, January 13, 2013

Re: Use registers in search and replace?

On Jan 13, 10:37 am, stosss <sto...@gmail.com> wrote:
> On Sun, Jan 13, 2013 at 1:25 PM, Bee <fo...@calcentral.com> wrote:
> > Correction:
> > That should be \a not \w because \w includes 0-9
>
> > :s#<a href="\(\a\{4,13}\)\d\{1,3}\.html">.*#\1#c
>
> I appreciate the effort but that doesn't solve the problem. Also
> thanks for the knowledge of the \a because I didn't know that and I
> don't remember seeing it in the help files. s/// is usually not a
> problem for me but I can't find if the contents of a register can be
> dropped into the s///. If not then I need to find a way to solve the
> visual mode approach of grabbing the letters. It appears I am trying
> to cross between normal, visual and command line at the same time.

Is something like this what you are looking for:

copy the folowing line to register a using: V"ay

> I need to be able to use visual mode to grab only the letters

:echo substitute(@a, 'need', 'want', "")

:help substitute

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: