|
Function CheckExp(patrn,strng,tagstr)
Dim regEx Set regEx = New RegExp ‘建立一個(gè)新對(duì)像 regEx.Pattern = patrn ‘設(shè)置模板 regEx.IgnoreCase = True ‘搜索是否區(qū)分大小寫(xiě)的 true表是不區(qū)分 flase表示區(qū)分 regEx.Global = True ‘搜索是否應(yīng)用于整個(gè)字符串 CheckExp = regEx.Replace(strng,tagstr) ‘執(zhí)行替換字符串 End Function re = "<title>(.+?)</title>" ‘加粗 Content = checkexp(re,Content,"<title>我的標(biāo)題</title>") Response.Write(Content) |
|
|