نسخة الكود كما يلي:
classwyd_aspcodehighlight
الخصوصية
PublicKeyword ، ObjectCommand ، سلاسل ، vbcode
PublicKeywordColor ، ObjectCommandColor ، StringsColor ، تعليق ، رمز برمجية
privatesubclass_initialize ()
setRegex = NewRegexp
regex.ignorecase = مجموعة صواب "ما إذا كانت الحروف حساسة للحالة وأنه غير متميز.
regex.global = true '' يعين الطبيعة العملية الكاملة.
KeywordColor = "#0000FF"
ObjectCommandColor = "#ff0000"
StringsColor = "#ff00ff"
التعليق = "#008000"
codecolor = "#993300"
الكلمة الرئيسية = "تعيين | خاص | إذا |
ObjectCommand = "Left | Mid | Right | int | Cint |
vbcode = ""
ينتهي
privatesubclass_terminate ()
setRegex = لا شيء
ينتهي
privatefunctionm_replace (Str ، نمط ، لون)
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
temp = re (match.value)
str = استبدال (str ، match.value ، temp)
التالي
regex.pattern = نمط "وضع مجموعة.
ifisstring = 1th
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 '' set ما إذا كانت الحروف حساسة للحالة.
tregex.global = true '' يعين الطبيعة العملية الكاملة.
tregex.pattern = "<.*؟>"
temp = tregex.replace (str ، "")
temp = استبدال (temp ، "<" ، "")
temp = استبدال (temp ، ">" ، "")
إعادة = درجة الحرارة
setTregex = لا شيء
الوظيفية
publicfunctionMakeli ()
dimtemp
IFVBCode = "" ثم