'fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
''''fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
End Function
End Class
例子
star=timer()
Set TT = New Wyd_AspCodeHighLight
If Request("xx")<>"" Then
TT.VBCode=Request("xx")
Response.write TT.MakeLi()
REsponse.write "<br>"&FormatNumber(timer()-star,2)*1000
Else
%>
<FORM METHOD=POST action="Index2.asp">
<TEXTAREA NAME="xx" ROWS="30" COLS="80">Class Lih
Private RegEx
Public Keyword,ObjectCommand,Strings,VBCode
Public KeyWordColor,ObjectCommandColor,StringsColor,Comment
Private Sub Class_Initialize()
Set RegEx = New RegExp
KeyWordColor="#0000FF"
ObjectCommandColor="#FF0000"
StringsColor="#FF00FF"
Comment="#008000"
Keyword="If|End|For|Next|Function|Then|Do|While|Wend|Class"
VBCode=""
End Sub
Private Sub Class_Terminate()
Set RegEx = Nothing
End Sub
Private Function M_Replace(Str,Pattern,Color)
RegEx.IgnoreCase = False '''' 设置是否区分字母的大小写。
RegEx.Global = True '''' 设置全程性质。
RegEx.Pattern = Pattern '''' 设置模式。</TEXTAREA>
<INPUT TYPE="submit" value=fff>
</FORM>
<%
End If
%>