通过asp程序采集网页时如何把被采集网页上的数字去掉?

通过asp程序采集网页时如何把被采集网页上的数字去掉?,第1张

Function LoseNum(ContentStr)

Dim ClsTempLoseStr,regEx

ClsTempLoseStr = Cstr(ContentStr)

Set regEx = New RegExp

regEx.Pattern = "[\d]+"

regEx.IgnoreCase = True

regEx.Global = True

ClsTempLoseStr = regEx.Replace(ClsTempLoseStr,"")

LoseNum= ClsTempLoseStr

Set regEx = Nothing

End Function

注意!这将删除shuju表中name的原有字段值更新为

allps表中的name字段值,务必做好备份

<%

set conn=server.createobject("adodb.connection")

conn.open "provider=microsoft.jet.oledb.4.0.0data source="&server.mappath("shoufei.mdb")

strsql="update shuju,allps set shuju.name=allps.name where shuju.id=allps.id"

conn.execute strsql

if err =0 then

response.write "更新成功"

else

response.write "有错误发生"

err.clear

end if

%>


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/6757368.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-27
下一篇 2023-03-27

发表评论

登录后才能评论

评论列表(0条)

保存