ASP 高级模板引擎实现类(3)
.Charset = Char
.Position = .Size
.LoadFromFile Server.MapPath(cPath)
LoadFromFile = .ReadText
.close
End With
Set obj = Nothing
End Function
' ***********************************************
' 获取正则匹配对象
' ***********************************************
Public Function GetMatch(ByVal Str, ByVal Rex)
Dim Reg, Mag
Set Reg = New RegExp
With Reg
.IgnoreCase = True
.Global = True
.Pattern = Rex
Set Mag = .Execute(Str)
If Mag.Count > 0 Then
Set GetMatch = Mag
Else
Set GetMatch = Server.CreateObject("Scripting.Dictionary")
End If
End With
Set Reg = nothing
End Function
' ***************************************
' 打开文档
' ***************************************
Public Sub open
c_Content = LoadFromFile(FilePath)
End Sub
' ***************************************
' 缓冲执行
' ***************************************
Public Sub Buffer
c_Content = GridView(c_Content)
内容版权声明:除非注明,否则皆为本站原创文章。