'函數(shù)名:getHTMLContent'參數(shù):NO-->要取得的字符數(shù), txtContent-->要處理的字符串
'功能: 從字符串里截取N個(gè)帶HTML的字符,現(xiàn)在的實(shí)現(xiàn)方法還不完善,過程是:從字符串里找各種控件的開始,然后依些分開,放到數(shù)組里,然后一個(gè)一個(gè)數(shù)組的加上來看看字符是否大于給定的字符如果是,那么,返回這個(gè)數(shù)組.
'作者:柳永法
'時(shí)間: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
%>
您可能感興趣的文章:- asp截取字符串的兩種應(yīng)用
- asp下實(shí)現(xiàn)截取字符串特定部分內(nèi)容函數(shù)
- asp 字符串截取函數(shù)
- GetBody asp實(shí)現(xiàn)截取字符串的代碼
- 用asp實(shí)現(xiàn)的截取指定格式字符串的代碼
- asp截取指定英漢混合字符串_支持中文
- ASP.NET 字符串截取
- asp CutStrX字符串截取函數(shù)(過濾全部HTML標(biāo)記)
- asp實(shí)現(xiàn)截取字符串函數(shù)