' function name: gethtmlcontent ' parameter:no--> the number of characters to be taken, txtcontent--> the string
' functionality to be processed: to intercept n-HTML characters from a string. Now the implementation is not perfect, the process is: Find the beginning of a variety of controls from the string, and then separated by some, put in the array, and then an array of added to see whether the character is greater than the given character if it is, then return the array.
' Author: Liu Yongfa
' time:2007-6-1 20:03 :)
function gethtmlcontent (no, txtcontent)
If len (txtcontent) <= no then
gethtmlcontent = txtcontent
ExitFunction
EndIf
Set re =new regexp
Re. Ignorecase =true
Re. Global =true
patrn = "<p|<br|<li|<table"
Patrn = split (patrn, "|")
Foreach p in patrn
Re. Pattern = p
Txtcontent = re. Replace (txtcontent, "| |") & p )
Next
Txtcontent = split (txtcontent, "| |")
Foreach e in txtcontent
If len (s) >no thenexitfor
s = s + e
Next
gethtmlcontent = s
endfunction
%>