이 유형의 강조 표시는 EditPlus Highlighting을 기반으로 수행됩니다.
코드 사본은 다음과 같습니다.
classwyd_aspcodehighlight
privategex
publickeyword, ObjectCommand, 문자열, vbcode
publickeywordcolor, ObjectCommandColor, StringsColor, 댓글, CodeColor
privatesubclass_initialize ()
setRegex = NewRegexp
regex.ignorecase = true '문자가 사례에 민감하고 True가 구별되지 않는지 설정합니다.
regex.global = true '는 전체 프로세스 특성을 설정합니다.
KeywordColor = "#0000ff"
ObjectCommandColor = "#ff0000"
stringscolor = "#ff00ff"
댓글 = "#008000"
CodeColor = "#993300"
Keyword = "set | private | if | if | | sub | end | function | for | next | do | while | wend | false | class" 'guan jian을 직접 추가하십시오
ObjectCommand = "왼쪽 | 중간 | 오른쪽 | int | cint | clng | String | join | array" '함수 직접 추가하십시오
vbcode = ""
Endsub
privatesubclass_terminate ()
setRegex = 아무것도 없습니다
Endsub
privateFunctionm_Replace (str, pattern, color)
regex.pattern = 패턴 '세트 모드입니다.
m_replace = regex.replace (str, "<fontcolor ="& color & "> $ 1 </font>")
최종 기능 장애
privateFunctionstring_replace (str, pattern, pattern1, color, isstring)
Dimtemp, Retstr
regex.pattern = pattern1
setMatches = regex.execute (str)
ForeachMatchInMatches의 Matches Collection의 이동
temp = re (match.value)
str = replace (str, match.value, temp)
다음
regex.pattern = 패턴 '세트 모드입니다.
ifisstring = 1then
string_replace = regex.replace (str, "<fontcolor ="& color & ">"$ 1 "</font>")
또 다른
string_replace = regex.replace (str, "<fontcolor ="& color & "> $ 1 </font>")
endif
최종 기능 장애
PrivateFunctionre (str)
Dimtregex, 온도
settregex = newRegexp
tregex.ignorecase = true '문자가 사례에 민감한 지 여부를 설정합니다.