Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regex - include html tags but exclude self closing tags

Status
Not open for further replies.

Badgers

Programmer
Nov 20, 2001
187
US
Hi,

I want to be able to process a string of html, but only to include html tags which are not self closing for example:

- <b>test</b> Include
- <b><br/><br />test</b> The br's to be excluded

I have this which sucks it all in. <[^/](.|\n)*?>.

Any help would be appriciated to finish the regex off.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top