'函數名:getHTMLContent'參數:NO-->要取得的字符數, txtContent-->要處理的字符串
'功能: 從字符串裡截取N個帶HTML的字符,現在的實現方法還不完善,過程是:從字符串裡找各種控件的開始,然後依些分開,放到數組裡,然後一個一個數組的加上來看看字符是否大於給定的字符如果是,那麼,返回這個數組.
'作者:柳永法
'時間: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
%>