Home All Groups Group Topic Archive Search About

Calling regex Experts

Author
30 Dec 2006 9:31 AM
Just Me
I hate regex and I struggle with it, but it may be the simplest way to
acheive what I need, if only I knew how ?!

Basically, I need to process HTML. I want to strip everything out including
all attributes and just leave the following tags.

<table> <tr> <td>Cell Content</td> [ more table data tags and content  ]
</tr></table>

If anyone has an idea it would be appreciated.

Author
30 Dec 2006 1:06 PM
rdrunner
How about a Input example?

Do you need to strip attributes from ALL tags or just table related tags?

As a 1st thought I would think about something along the lines of....
(<{\w}*?).*?>
and replace it with
$0>
(Is $ 0 or 1 based? Been a while since i used regexp)

Show quoteHide quote
"Just Me" <news.microsoft.com> wrote in message
news:efRoaV$KHHA.1280@TK2MSFTNGP04.phx.gbl...
>
> I hate regex and I struggle with it, but it may be the simplest way to
> acheive what I need, if only I knew how ?!
>
> Basically, I need to process HTML. I want to strip everything out
> including all attributes and just leave the following tags.
>
> <table> <tr> <td>Cell Content</td> [ more table data tags and content  ]
> </tr></table>
>
> If anyone has an idea it would be appreciated.
>
>