functionc(Tstr,Word)
Dimre
Setre=newRegExp
re.IgnoreCase=True
re.Global=True
re.pattern="("&Word&")"
c=re.replace(Tstr,"
Endfunction
调用方法
response.writec("内容字串","要显示为红色的字")
比如
<%
functionc(Tstr,Word)
Dimre
Setre=newRegExp
re.IgnoreCase=True
re.Global=True
re.pattern="("&Word&")"
c=re.replace(Tstr,"
Endfunction
Response.write("lamking.com","a")
%>
就把lamking.com中的a替换为红色的。