RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Strip HTML tags
Expression
<(\s*/?\s*)\w+?(\s*(([\w-]+="[^"]*?")|([\w-]+='[^']*?')|([\w-]+=[^'"<>\s]+)))*(\s*/?\s*)>
Description
This RE strips HTML open and close tags from text with any attributes provided, including not properly formatted tags.
Matches
<html>, <meta http-equiv=Content-Type content="text/html; charset=windows-1250">, < / html body="<'something'>" body='"any thing"' b=jj123-qqj / >
Non-Matches
<html / d>, <html body='something">, <d /html>
Author Rating: Not yet rated. István Dani
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials