코드 사본은 다음과 같습니다.
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"
키워드 = "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 = 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의 'Traversal of the Matches Collection
temp = re (match.value)
str = replace (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>")
endif
최종 기능 장애
PrivateFunctionre (str)
Dimtregex, 온도
settregex = newRegexp
tregex.ignorecase = true ''문자가 사례에 민감한 지 여부를 설정하십시오.
tregex.global = true ''는 전체 프로세스 특성을 설정합니다.
tregex.pattern = "<.*?>"
temp = tregex.replace (str, "")
temp = replace (temp, "<", "")
temp = replace (temp, ">", "")
RE = 온도
settregex = 아무것도 없습니다
최종 기능 장애
PublicFunctionMakeli ()
dimtemp
ifvbcode = ""그런 다음