> This "*" is greedy. I think you want
>
> :%s@</\=FONT.\{-}>@@g
>
> which is
>
> < a literal "<"
> /\= an optional "/"
> FONT the literal tag
> .\{-} any character, as few as possible
> > a literal ">"
>
> You might put optional whitespace before the slash or FONT, making it
>
> :%s@<\s*/\=\s*FONT.\{-}>@@g
>
> and optionally allow case-insensitivity with the "\c" token:
>
> :%...@\c<\s*/\=\s*FONT.\{-}>@@g
>
> As a non-greedy alternative, you might also consider something
> like the character-class "[^>]"
>
> :%s@<\s*/\=\s*FONT[^>]*>@@g
>
> Hope this gives you what you need as well as some ways to riff on
> the theme.
>
> -tim
Tim
Thanks a lot. That worked great. Quick question. Is this correct: @
can be used instead of / a the separater between the searched-for text
and the replacement text, and when so used, this allows one to use /
as a literal?
Kurt
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---