Function closehtml(strContent)
*************************************
自動閉合html
*************************************
Dim arrTags
Set re = New RegExp
re
re
arrTags = Array("p"
For i =
OpenPos =
ClosePos =
re
Set strMatchs = re
For Each Match in strMatchs
OpenPos = OpenPos +
Next
re
Set strMatchs = re
For Each Match in strMatchs
ClosePos = ClosePos +
Next
For j =
strContent = strContent + "</" + arrTags(i) + ">"
Next
Next
closehtml = strContent
Set re = Nothing
End Function
Function closeUBB(strContent)
*************************************
自動閉合UBB
*************************************
Dim arrTags
Set re = New RegExp
re
re
arrTags = Array("code"
建立數組
For i =
OpenPos =
ClosePos =
re
Set strMatchs = re
For Each Match in strMatchs
OpenPos = OpenPos +
Next
re
Set strMatchs = re
For Each Match in strMatchs
ClosePos = ClosePos +
Next
For j =
strContent = strContent + "[/" + arrTags(i) + "]"
Next
Next
closeUBB = strContent
Set re = Nothing
End Function
From:http://tw.wingwit.com/Article/program/net/201311/14343.html