Hi,

kurt krueckeberg wrote:
> 
>  I want to keep are the table-related tags, like <table>, <tr>, <td>,
> </table>, </tr>, </td>. etc., and delete all others.   An example of
> the tags I want to delete would be:
> 
>     <p><font><font>die Marktlücke</font></font></p>
> 
> leaving just: die Marktlücke
> 
> I don't understand why this regular expression
> 
>  s@</\=[^t][^>]*>@@g
> 
>  is finding '</td>', '</tr>', etc. I thought it was doing this:
> 
> Match  literal '<'
> Match optional '/'
> Match anythiing other than 't'
> Match zero or more of anything other than '>'
> 
> However, it matches '</td>', '</tr>', etc. I don't understand why

the closing tags are matched because the slash is not matched with the
optional slash in your regular expression but with [^t]. You can correct
this by including the slash in the first character class:

  s@</\=[^/t][^>]*>@@g

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

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

Reply via email to