การคัดลอกรหัสมีดังนี้:
-
'ฟังก์ชั่นคำอธิบาย: ลบแท็ก HTML ด้วยความสม่ำเสมอ
'ไม่สามารถเก็บรักษาไว้ได้ ฯลฯ และผู้ใช้กำหนด <และ>
-
FunctionRemoveHtmltag (fstring)
หรี่ลง
setre = newregexp
re.ignorecase = true
re.pattern = "<(. [^>]*)>"
fstring = re.replace (fstring, "")
setre = ไม่มีอะไร
removehtmltag = fstring
endfunction
-
'ฟังก์ชั่นคำอธิบาย: ลบแท็ก HTML
'ไม่สามารถเก็บรักษาไว้ได้ ฯลฯ และผู้ใช้กำหนด <และ>
-
functionRemove_html (str)
dimilen1, ilen2
dowhileinstr (1, str, "<", 1)> 0
ilen1 = instr (1, str, "<", 1)
ilen2 = instr (1, str, ">", 1)
str = ซ้าย (str, ilen1-1) & mid (str, ilen2+1)
วง
remove_html = str
endfunction
-
'ฟังก์ชั่นคำอธิบาย: ลบแท็ก HTML
'การลบเครื่องหมายที่กำหนดเองอาจช้าไปหน่อย
-
functionRemoveHtml (strtext)
Dimtaglist
tagList = ";!-;! doctype; a; ตัวย่อ; ที่อยู่;
"bgsound; big; blockquote; body; br; ปุ่ม; คำอธิบายภาพ; center; cite; code; code;" & _
"Col; colgroup; ความคิดเห็น; dd; del; dfn; dir; div; dl; dt; em; embed; fieldset;" & _
"ตัวอักษร; form; frame; frameset; head; h1; h2; h3; h4; h5; h6; hr; html; i; iframe; img;" & _ _
"อินพุต; ins; isIndex; kbd; label; layer; lagend; li; link; listing; map; marquee;" & _ _
"เมนู; meta; nobr; noframes; noscript; object; ol; param; param; plaintext;" & _