การไฮไลต์ประเภทนี้ทำขึ้นอยู่กับการไฮไลต์ EditPlus
การคัดลอกรหัสมีดังนี้:
classwyd_aspcodehighlight
Privateregex
Publickeyword, ObjectCommand, Strings, VBCode
publickeywordcolor, objectCommandColor, stringscolor, ความคิดเห็น, codecolor
Privatesubclass_initialize ()
setregex = newregexp
regex.ignorecase = true 'ตั้งค่าว่าตัวอักษรนั้นมีความอ่อนไหวและเป็นจริงหรือไม่
regex.global = true 'ตั้งค่าธรรมชาติเต็มรูปแบบ
KeywordColor = "#0000ff"
ObjectCommandColor = "#ff0000"
stringsColor = "#ff00ff"
ความคิดเห็น = "#008000"
codecolor = "#993300"
keyword = "set | ส่วนตัว | ถ้า | จากนั้น | sub | end | function | for | next | do | wend | true | false | nothing | class" 'โปรดเพิ่ม Guan Jian ด้วยตัวคุณเอง
ObjectCommand = "ซ้าย | กลาง | ขวา | int | cint | clng | string | เข้าร่วม | array" 'ฟังก์ชั่นโปรดเพิ่มด้วยตัวคุณเอง
vbCode = ""
enddub
Privatesubclass_terminate ()
setregex = ไม่มีอะไร
enddub
PrivateFunctionm_replace (str, pattern, color)
โหมดชุด regex.pattern = pattern '
m_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
endfunction
PrivateFunctionString_replace (Str, Pattern, Pattern1, Color, Isstring)
dimtemp, retstr
regex.pattern = pattern1
setMatches = regex.execute (str)
คอลเลกชันการจับคู่ของ ForeachMatchinMatches
temp = re (match.value)
str = แทนที่ (str, match.value, temp)
ต่อไป
โหมดชุด regex.pattern = pattern '
ifissstring = 1 จากนั้น
string_replace = regex.replace (str, "<fontcolor =" & color & ">" $ 1 "</font>"
อื่น
string_replace = regex.replace (str, "<fontcolor =" & color & "> $ 1 </font>")
endif
endfunction
PrivateFunctionre (STR)
Dimtregex, อุณหภูมิ
setTregex = newregexp
tregex.ignorecase = true 'ตั้งค่าว่าตัวอักษรมีความอ่อนไหวหรือไม่