字段显示有图片怎么去除!
比如content,字段中存储有图片格式为 <img src= " "> </img>
怎么在前台把这个图片去除,纯文字显示呢,
------解决方案--------------------最简单的方法,用正则表达式:
Function CleanHTML(str)
Dim re
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern= " <(.[^> ]*)> "
CleanHTML = re.Replace(str, " ")
set re=Nothing
End Function