Regex: Scrub HTML
I have a bunch of 开发者_运维技巧HTML code where I want to remove all the HTML markup.
I think this is possible with Regex (Regular expression). With search and replace, how would I do this?
I tried <*> where I thought * was a wildcard, but apparently not. How would I make regex find all the
< text > ?A simple version would be:
<[^>]+>
[]
defines a character class, ^
excludes characters. Here is an example.
Take a look at this: http://haacked.com/archive/2004/10/25/usingregularexpressionstomatchhtml.aspx
Select "Regular Expression" in Search Mode. Enter [<].*?>
in Find What field and leave the Replace With field empty.
精彩评论