Кода -копия выглядит следующим образом:
Classwyd_aspcodehighlight
PrivateRegex
PublicKeyWord, ObjectCommand, Strings, VBCode
PublicKeyWordColor, ObjectCommAndColor, StringsColor, Comment, CodeColor
Privatesubclass_initialize ()
SetRegex = newRegexp
Regex.ignorecase = true '' Установите, являются ли буквы чувствительны к корпусу, а True не отличается.
Regex.global = true '' устанавливает полнопроцесс-природу.
KeywordColor = "#0000ff"
ObjectCommandColor = "#ff0000"
Stringscolor = "#ff00ff"
Комментарий = "#008000"
CodeColor = "#993300"
Ключевое слово = "set | private | if | then | sub | end | function | for | heall | do | while | wend | true | false | ничего | класс" '' пожалуйста, добавьте сами гуань Цзянь
ObjectCommand = "слева | Средний | Правый | int | cint | clng | String | join | array" '' 'Функция, пожалуйста, добавьте его самостоятельно
Vbcode = ""
Заканчивая
Privatesubclass_mterminate ()
SetRegex = ничего
Заканчивая
Privatefunctionm_replace (str, pattern, color)
Regex.pattern = pattern '' режим установки.
M_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
Конечная функция
PrivateFunctionString_Replace (Str, Pattern, Pattern1, Color, Issstring)
Dimtemp, Retstr
Regex.pattern = pattern1
Setmatches = regex.execute (str)
Foreachmatchinmatches 'Traversal of the Matches Collection
Temp = re (match.value)
Str = заменить (str, match.value, temp)
Следующий
Regex.pattern = pattern '' режим установки.
Ifisstring = 1then
String_replace = regex.replace (str, "<fontcolor =" & color & ">" $ 1 "</font>")
Еще
String_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
Эндиф
Конечная функция
PrivateFunctionRe (str)
Dimtregex, Temp
SetTregex = newRegexp
Tregex.ignorecase = true 'установите, являются ли буквы чувствительны к случаю.
Tregex.global = true '' устанавливает полнопроцесс-природу.
Tregex.pattern = "<.*?>"
Temp = tregex.replace (str, "")
Temp = reply (temp, "<", "")
Temp = reply (temp, ">", "")
Re = temp
SetTregex = ничего
Конечная функция
Publicfunctionmakeli ()
Dimtemp
Ifvbcode = "" Затем