[Original code] Use the regular expression to remove the HTML tag in the text

xiaoxiao2021-03-06  50

Because my previous time, XMLHTTTP volume captures the remote information of the article http://blog.9cbs.net/babyt/archive/2004/09/08/98516.aspx Recently someone asked me how to save articles in text format Instead of using HTML storage directly, this will save database space. So I wrote such a function to put the HTML tagger function in the text, but the HTML document is still very effective, "strHTML) DIM Objregexp, match, matches set objRegexp = new regexp objRegexp.Ignorecase = TRUE ObjregExp.global = true 'Take the <> ObjRegexp.pattern = "<. >"' to match Set Matches = ObjRegexp.execute (strHtml) 'traversing matching collections, replacing matching item for Each Match in matches strHtml = Replace (strHtml, Match.Value, ") Next Removehtml = strHtml set objRegexp = Nothingend Function

%>

转载请注明原文地址:https://www.9cbs.com/read-117383.html

New Post(0)