日期:2014-05-17 浏览次数:20895 次
function LinkKeyword(bIgnoreCase, MainStr, sNeedReplace, sReplaceWith) dim sResult Dim objRegExp Set objRegExp = New Regexp objRegExp.IgnoreCase = bIgnoreCase objRegExp.Global = True objRegExp.Pattern = "\b" & sNeedReplace & "\b(?![\w ]*</a>|>)" sResult = objRegExp.Replace(MainStr, sReplaceWith) Set objRegExp = Nothing LinkKeyword = sResult end function