一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

ASP:去掉字符串中的超连接

时间:2008-02-24 编辑:简简单单 来源:一聚教程网

11111

2222

 

3333

44444

 
想得到的结果是: 

11111

2222

3333

4444

 

<%
Function regExReplace(sSource,patrn, replStr) 
Dim regEx, str1 
str1 = sSource 
Set regEx = New RegExp 
regEx.Pattern = patrn 
regEx.IgnoreCase = True 
regEx.Global = True 
regExReplace = regEx.Replace(str1, replStr) 
End Function 

dim c1,c2 
c1="

11111

2222

 

3333

44444

 " 
c2=regExReplace(c1,"|","")
response.Write(c2) 
%>

热门栏目