Regular Expressions (Mark)
9 Oct 2004 22:34:37 -0400

          From comp.compilers

Related articles
Regular Expressions (2004-10-09)
Re: Regular Expressions (Eric Bodden) (2004-10-12)
Re: Regular Expressions (Randall Hyde) (2004-10-12)
Re: Regular Expressions (Sylvain Schmitz) (2004-10-12)
Re: Regular Expressions (Martin Ward) (2004-10-12)
Re: Regular Expressions (2004-10-12)
Re: Regular Expressions (David Z Maze) (2004-10-12)
[10 later articles]
| List of all articles for this month |

From: (Mark)
Newsgroups: comp.compilers
Date: 9 Oct 2004 22:34:37 -0400
Keywords: lex, comment
Posted-Date: 09 Oct 2004 22:34:37 EDT

Hi everyone

I just can't seem to figure out how to invent a regular expression
that will strip all HTML tags (except TABLE tags) out of a string and
leave the rest of the text. When a TABLE tag is encountered i need to
strip everything under it.

This will strip all HTML out <[^>]*>

But how do I make it also strip entire TABLE elements?

Perhaps something like <table[^</table>]*</table>|<[^>]*>

[That seems awfully complex for a single regex. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.