Intercept N characters with HTML from a string. The current implementation method is not perfect. The process is: find the beginning of various controls from the string, then separate them sequentially, put them into an array, and then add them one by one into the array. Come up and see if the character is greater than the given character. If so, then return this array.
'Function name: getHTMLContent' Parameters: NO-->The number of characters to be obtained, txtContent-->The string to be processed
'Function: intercept N characters with HTML from the string. The current implementation method is not perfect. The process is: find the beginning of various controls from the string, then separate them, put them into the array, and then one by one Add the array to see if the character is greater than the given character. If so, then return this 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
%>