For example:
/* comment1
comment2
comment3 */
I want delete the comments (including /*and*/)
One way is using macro. How to do this using just replace command?
How to represent it in regular expression ?
I tried ^(/*^)^(*^)^(*/^) or ^(\/\*^)^(*^)^(\*\/^) or ^(^/^*^)^(*^)^(^*^/^), all cannot work.
I also tried in VIM: %s/\(\/\*\)\(*\)\(\*\/\)//, also doesn't work, I know * limits us to only one line search,
so any solution to describe the contents that have several lines?
Thanks a lot
/* comment1
comment2
comment3 */
I want delete the comments (including /*and*/)
One way is using macro. How to do this using just replace command?
How to represent it in regular expression ?
I tried ^(/*^)^(*^)^(*/^) or ^(\/\*^)^(*^)^(\*\/^) or ^(^/^*^)^(*^)^(^*^/^), all cannot work.
I also tried in VIM: %s/\(\/\*\)\(*\)\(\*\/\)//, also doesn't work, I know * limits us to only one line search,
so any solution to describe the contents that have several lines?
Thanks a lot