Этот тип выделения выполняется на основе выделения EditPlus
Кода -копия выглядит следующим образом:
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 | naick | 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 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 'устанавливает, являются ли буквы чувствительны к случаю.