A cópia do código é a seguinte:
Classwyd_aspcodehighlight
Privateregex
PublicKeyword, ObjectCommand, Strings, VBCode
PublicKeywordColor, ObjectCommandColor, StringScolor, Comentário, Codecolor
Privatesubclass_initialize ()
SetRegex = newRegexp
Regex.ignorecase = true '' Defina se as letras são sensíveis ao caso e a verdadeira não é distinguida.
Regex.global = true '' define a natureza de processo completo.
KeywordColor = "#0000FF"
ObjectCommandColor = "#FF0000"
Stringscolor = "#ff00ff"
Comentário = "#008000"
Codecolor = "#993300"
Keyword = "Set | Private | se | então | sub | end | function | para | Next | Do | while |
ObjectCommand = "Esquerda | MID | DIREITA | INT | CINT | CLNG | String | JONE | MATRAY" '' FUNÇÃO. Adicione você mesmo
Vbcode = ""
Endsub
Privatesubclass_terminate ()
Setregex = nada
Endsub
PrivateFunctionM_replace (str, padrão, cor)
Regex.pattern = padrão '' Modo de conjunto.
M_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
Função final
PrivateFunctionstring_replace (STR, Pattern, Pattern1, Color, Isstring)
Dimtemp, retstr
Regex.Pattern = Pattern1
SetMatches = regex.execute (str)
ForeachMatchinMatches '' Traversal of the Matches Collection
Temp = re (match.value)
Str = substituir (str, match.value, temp)
Próximo
Regex.pattern = padrão '' Modo de conjunto.
IfisString = 1Then
String_replace = regex.replace (str, "<fontcolor =" & color & ">" $ 1 "</font>")
Outro
String_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
Endif
Função final
PrivateFunctionre (STR)
Dimtregex, temp
SetTregex = newRegexp
Tregex.ignorecase = true '' Defina se as letras são sensíveis ao caso.
Tregex.global = true '' define a natureza de processo completo.
Tregex.pattern = "<.*?>"
Temp = tregex.replace (str, "")
Temp = substituir (temp, "<", "")
Temp = substituir (temp, ">", "")
Re = temp
SetTregex = nada
Função final
PublicFunctionMakeli ()
Dimtemp
Ifvbcode = "" então