Friday, December 30, 2011

RegExp - Matching comments doubt

Suppose I have:

<!-- two
lines --> ?


This works:

g:/<!--\_.\{-}-->/ delete

But why isn't

:g/<!--\_.\{-}> /delete

deleting until the >

Also, If I try to delete until the last > in the file:

:g/<!--\_.*>/ delete

is not deleting until the last >. I don't understand why...


--
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:

Post a Comment