cpradio
15 years agoVisitor
Strip out HTML Tags
I am reading an XML file to populate a springboard, but the descriptions in the XML have HTML tags embeded in them. How can I quickly strip these out?
Thanks,
Matt
Thanks,
Matt
function StringRemoveHTMLTags(baseStr as String) as String
r = createObject("roRegex", "<[^<]+?>", "i")
return r.replaceAll(baseStr, "")
end function
"lewi-p" wrote:
For anyone that's interested I used this...function StringRemoveHTMLTags(baseStr as String) as String
r = createObject("roRegex", "<[^<]+?>", "i")
return r.replaceAll(baseStr, "")
end function
"cpradio" wrote:
I am reading an XML file to populate a springboard, but the descriptions in the XML have HTML tags embeded in them. How can I quickly strip these out?
"jbrave" wrote:
I've had way more success using string functions like instr, mid left and right than regex. I posted a regex I found for parsing HTML a while ago, but have never actually gotten it to work beyond giving me the string "<HTML>" so if anyone has some code that works to get a specific tag or an associativearray of tags it would be awesome.