asp 正则标签替换

[复制链接]
查看11 | 回复1 | 2010-5-25 10:00:21 | 显示全部楼层 |阅读模式
Function oflink_lcasetag(imgstrng)
Dim regEx, Match, Matches '建立变量。
Set regEx = New RegExp '建立正则表达式。
regEx.Pattern = "" '设置模式。
regEx.IgnoreCase = true '设置是否区分字符大小写。
regEx.Global = True '设置全局可用性。
Set Matches = regEx.Execute(imgstrng) '执行搜索。
imgstrng=imgstrng
For Each Match in Matches '遍历匹配集合。
imgstrng=replace(imgstrng,Match.Value,lcase(Match.Value))
Next
oflink_lcasetag = imgstrng
End Function
网上找到上面的正则,实测成功,但想在这个基础上加个替换

替换成
,替换成

回复

使用道具 举报

千问 | 2010-5-25 10:00:21 | 显示全部楼层
Function oflink_lcasetag(imgstrng) Dim regEx, Match, Matches '建立变量。Set regEx = New RegExp '建立正则表达式。regEx.Pattern = "" '设置模式。regEx.IgnoreCase = true '设置是否区分字符大小写。regEx.Global = True '设置全局可用性。Set Matches = regEx.Execute(imgstrng) '执行搜索。imgstrng=imgstrng For Each Match in Matches '遍历匹配集合。imgstr
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行