On 2009-04-16, Rogers, Brian A. wrote:
> I'm trying to write a quick s+r to replace single line "multi-line
> style" comments with single-line style comments.
> For some reason, it won't match when I use paren's to store match
> fragments.
> Below is what I'm using
> 
> :%s#/\*(.*)\*/#//\1#g
> 
> This winds up matching nothing in my file, where if I do a search with
> the same pattern without the paren's everything's great.

You need to escape the parentheses:

    :%s#/\*\(.*\)\*/#//\1#g

See

    :help /\(

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to