dnotestine
asked on
VB6 and MS Regular Expr - strip HTML
Using VB6 and MS Regular Expressions, I need to be able to strip out the HTML from a string, leaving just plain text that was located outside the HTML tags. Somewhere I saw a regular Expression to do this. What is the pattern and how do I do I do it in VB6? A simple code sample would be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your Function worked perfectly in VB6. I just copied and pasted.
<script language="VBSCRIPT">
theString = "<b>Some</b>string<br>with
Set theExp = new RegExp
theExp.Pattern = "<[^>]+>"
theExp.Global = True
MsgBox theExp.Replace(theString, "")
</script>