-
'ชื่อฟังก์ชั่น: Scripthtml
'เอฟเฟกต์: แท็กตัวกรอง HTML
'ข้อโต้แย้ง: ข้อ จำกัด ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
functionscripthtml (byvalconstr, tagname, ftype)
หรี่ลง
setre = newregexp
re.ignorecase = true
re.global = true
SelectCaseFtype
กรณีที่ 1
re.pattern = "<" & tagname & "([^>])*>"
cronst = re.replace (const, "")
กรณีที่ 2
re.pattern = "<" & tagname & "([^>])*>.*? </" & tagname & "([^>])*>"
cronst = re.replace (const, "")
กรณีที่ 3
re.pattern = "<" & tagname & "([^>])*>"
cronst = re.replace (const, "")
re.pattern = "</" & tagname & "([^>])*>"
cronst = re.replace (const, "")
endelect
scripthtml = cronst
setre = ไม่มีอะไร
endfunction