本文介绍了如何使用coldfusion获得href值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<cfoutput>
<cfsavecontent variable="s">
This is some text. It is true that <a href="http://www.cnn.com">Harry Potter</a> is a good
</cfsavecontent>
<cfset matches = reMatch("<[aA].*?>",s) />
#matches#
</cfoutput>
我只需要获取http://www.cnn.com" 怎么做p>
I need to get only "http://www.cnn.com" how to do this
推荐答案
@Bhargavi : 你的正则表达式没问题.改用 #matches[1]#
.
@Bhargavi : Your regex is fine.Try #matches[1]#
instead.
<cfdump var="#matches#">
将向您显示可以对结果进行相应操作的值数组.
<cfdump var="#matches#">
will show you the array of values on which the results can be manipulated accordingly.
这篇关于如何使用coldfusion获得href值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!