【发布时间】:2010-11-01 12:46:15
【问题描述】:
我正在寻找一种从 ColdFusion 字符串中解析 HTML 标记的快速方法。我们正在提取一个 RSS 提要,其中可能包含任何内容。然后我们对信息进行一些操作,然后将其吐回另一个地方。目前我们正在使用正则表达式来执行此操作。有没有更好的方法来做到这一点?
<cfloop from="1" to="#ArrayLen(myFeed.item)#" index="i">
<cfset myFeed.item[i].description.value =
REReplaceNoCase(myFeed.item[i].description.value, '<(.|\n)*?>', '', 'ALL')>
</cfloop>
我们正在使用 ColdFusion 8。
【问题讨论】:
标签: regex coldfusion rss html-parsing coldfusion-8