Este tipo de resaltado se realiza en función de EditPlus resaltando
La copia del código es la siguiente:
Classwyd_aspcodehighlight
PrivateREGEX
PublicKeyword, ObjectCommand, Strings, VBCode
PublicKeyWordColor, ObjectCommandColor, StringsColor, Comment, CodeColor
Privatesubclass_initialize ()
Setregex = newregexp
Regex.ignorecase = true 'Establezca si las letras son sensibles a mayúsculas y verdaderas no se distinguen.
Regex.global = true 'Establece la naturaleza de proceso completo.
KeywordColor = "#0000ff"
ObjectCommandColor = "#FF0000"
StringsColor = "#FF00FF"
Comentario = "#008000"
CodeColor = "#993300"
Palabra clave = "set | private | if | entonces | sub | end | function | para | next | do | while | wend | verdadero | falso | nada | clase" 'Por favor, agregue Guan Jian usted mismo
ObjectCommand = "Izquierda | Mid | Right | int | Cint | Clng | String | Join | Array" 'Función Por favor, agrégalo usted mismo
Vbcode = ""
Endsub
Privatesubclass_merminate ()
SetRegex = nada
Endsub
PrivateFunctionM_replace (str, patrón, color)
Regex.pattern = patrón 'Modo de conjunto.
M_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
Función final
PrivateFunctionstring_replace (STR, Pattern, Pattern1, Color, Isstring)
Dimtemp, retén
Regex.pattern = patrón1
SetMatches = regex.execute (str)
ForeachmatchinMatches 'Collection of Matches Collection
Temp = Re (Match.Value)
Str = reemplazar (str, match.value, temp)
Próximo
Regex.pattern = patrón 'Modo de conjunto.
Ifisstring = 1
String_replace = regex.replace (str, "<fontcolor =" & color & ">" $ 1 "</font>")
Demás
String_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
Endif
Función final
PrivateFunctionRe (STR)
Dimtregex, temperatura
Settregex = newegexp
Tregex.ignorecase = true 'Establece si las letras son sensibles a la caja.