28,391
社区成员
发帖
与我相关
我的任务
分享
<%
dim str,reg
set reg = New RegExp
reg.Global=true
reg.Pattern="(<\?xml.*?\/>)"
reg.IgnoreCase = false
str="<?xml:namespace prefix = o ns = ""urn:schemas-microsoft-com:office:office"" />哈哈<?xml:namespace prefix = o ns = ""urn:schemas-microsoft-com:office:office"" />"
str=trim(str)
do while reg.Execute(str).count <> 0
str=reg.Replace(str,"")
loop
response.write(str)
%>
Function RegReplace(vStr,vReg,vCode)
Dim Re,sStr
sStr = vStr
Set Re = New RegExp
Re.Pattern = vReg
Re.IgnoreCase = True
Re.Global = True
If Re.Test(sStr) Then
sStr = Re.Replace(sStr,vCode)
End If
RegReplace = sStr
End Function