La copie de code est la suivante:
Classwyd_aspcodehighlight
PrivateRegex
PublicKeyword, ObjectCommand, Strings, VBCode
PublicKeywordColor, objectCommandColor, StringsColor, Commentaire, CodeColor
PRIVATESUBCLASS_INITIALIZE ()
SetRegex = newRegexp
Regex.ignorecase = true '' set si les lettres sont sensibles et vraies ne sont pas distinguées.
Regex.global = true '' définit la nature du processus complet.
KeywordColor = "# 0000FF"
ObjectCommandColor = "# ff0000"
StringsColor = "# FF00FF"
Commentaire = "# 008000"
CodeColor = "# 993300"
Keyword = "set | privé | si | alors | sub | fin | Fonction | pour | Suivant | do | while | wend | true | false | rien | Classe" '' Veuillez ajouter Guan Jian vous-même
ObjectCommand = "Left | Mid | Droite | Int | Cint | Clng | String | JOIN | Array" '' Fonction Veuillez l'ajouter vous-même
Vbcode = ""
Fin
PRIVATESUBCLASS_TERMINE ()
SetRegex = rien
Fin
PrivateFunctionm_replace (str, motif, couleur)
Regex.Pattern = motif '' set mode.
M_replace = regex.replace (str, "<fontcolor =" & colore & "> $ $ </font>")
Finition de fin
PrivateFunctionString_replace (Str, Pattern, Pattern1, Color, Isstring)
Dimtemp, retstr
Regex.pattern = motif1
Setmatches = regex.execute (str)
ForEachMatchInMatches '' '' Traversion de la collection Matches
Temp = re (match.value)
Str = remplacer (str, match.value, temp)
Suivant
Regex.Pattern = motif '' set mode.
Ifissstring = 1Then
String_replace = regex.replace (str, "<fontcolor =" & colore & ">" $ $ "</font>")
Autre
String_replace = regex.replace (str, "<fontcolor =" & colore & "> $ $ </font>")
Endire
Finition de fin
PrivateFunctionre (STR)
Dimtregex, temp
Settregex = newRegexp
TREGEX.IGNORECASE = TRUE '' SET SI LES LETTRES SONT SENSIFIÉES.
Tregex.Global = True '' définit la nature du processus complet.
Tregex.Pattern = "<. *?>"
Temp = tregex.replace (str, "")
Temp = remplacer (temp, "<", "")
Temp = remplacer (temp, ">", "")
Re = temp
Settregex = rien
Finition de fin
PublicFunctionMakeli ()
Dimlem
Ifvbcode = "" puis