Possible Duplicate:
RegEx match open tags except XHTML self-contained tags
how can I replace everything in between < > and the tag itself with a space?
Example:
<span class="bold">asdfsdfsda<br />sadfsdfsdf</span>
Output:
asdfsdfsda sadfsdfsdf
Possible Duplicate:
RegEx match open tags except XHTML self-contained tags
how can I replace everything in between < > and the tag itself with a space?
Example:
<span class="bold">asdfsdfsda<br />sadfsdfsdf</span>
Output:
asdfsdfsda sadfsdfsdf
DON'T PARSE HTML with regex. If this in a onetime controlled situation, then this would do:
Here it is in ruby. Change it based upon your tool.
myline = '<span class="bold">asdfsdfsda<br />sadfsdfsdf</span>'
myline.gsub(/<[^<]*>/," ")