Dget()
代码如下.
''''''''''''''''''
'Dcse Get''''''''
'Dget("select * from Table","<li>$0 - $1</li>")
'''''''''''''''''
Function Dget(sqlTxt,strFormat)
Dim regex,restr
Set regex = New RegExp
regex.Pattern = "\$(\d+)"
regex.Global = True
Set Matches = regEx.Execute(strFormat)
set rs=conn.execute(sqlTxt)
do while not rs.eof
tmp=strFormat
For Each Match in Matches
n=int(right(Match.value,len(Match.value)-1))
tmp=replace(tmp,"$"&n,rs(n))
Next
restr=restr&tmp& vbCRLF
rs.movenext
loop
Dget=restr
End Function