日期:2014-05-16  浏览次数:20800 次

正则表达式,怎么过滤,写法

<%a="<a href=jjjj>ooooooooo</a>kkkkkkkkkk<style>88888888888888</style>"

a=Html("</?a[^>]*>","",a)


response.write(a)
%>
我是想 把这链接的去掉,还有这链接的文字也去掉,要怎么写正则表达式。

如文中,的样式,用这个表达式式只把<style></style> 去掉了,中间的内容没去掉,我就想

把这里面<style>888888</style> 的都一起去掉。

a=Html("</?a[^>]*>","",a)  这个写法要怎么写。
------解决方案--------------------
Set Re = New Regexp
Re.Global = True
Re.Ignorecase = True
Re.Pattern="<a.*<\/a>"
b = re.Replace(a,"")

b就是你要的结果。