突出显示字符串中查询到的单词
2008-07-07 13:15
Function BoldWord(strContent,word)
dim objRegExp
Set objRegExp=new RegExp
objRegExp.IgnoreCase =true
objRegExp.Global=True
objRegExp.Pattern="(" & word & ")"
strContent=objRegExp.Replace(strContent,"<font color=""#FF0000"">$1</font>" )
Set objRegExp=Nothing
BoldWord=strContent
End Function