问一个有关文本内容的小问题
怎么提取文本中的一段内容 然后替换掉呢??
如
test
<img asdfasdfadsfasdfadsfas />aadfasdfasdfasdfa
我要删除
<img asdfadsfasdfadfa />
这些内容
asp?文本
------解决方案--------------------<%
str="<img asdfasdfadsfasdfadsfas />aadfasdfasdfasdfa"
temp=replace(str,"<img asdfasdfadsfasdfadsfas />")
response.write temp
%>
------解决方案--------------------<%
dim a
set re=new regexp
re.ignorecase=true
re.global=true
re.pattern="<img .*/>"
a="<img asdeqsd />aadfasdfasdfasdfa"
a=re.replace(a,"")
response.Write a
%>