国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

ASP獲取代碼中第一張圖片地址

2019-11-17 04:16:42
字體:
來源:轉載
供稿:網友

'把pattern 又修改了下

'code要檢測的代碼
'http://www.devdao.com
'leixing html 或者ubb
'nopic 代碼沒有圖片時默認值

function toppic(code,leixing,nopic)
        set regex = new regexp
        regex.ignorecase = true
        regex.global = true
        if leixing = "html" then
                regex.pattern = "<img(.*?)src/s?/=/s?(/u0022?)([^/u0022//>]+)"
        else
                regex.pattern = "/[img/]([^/u005B]+)“
        end if
        set matches = regex.execute(code)
        if regex.test(code) then
                                  if leixing = "html" then
                           toppic = matches(0).submatches(3)
                                  else
                                           toppic = matches(0).submatches(0)
                                  end if
        else
                toppic = nopic
        end if
end function
code1 = "<img src=""pic = toppic(code1,"html","nopic.gif")
response.Write pic


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 双流县| 肥乡县| 湖州市| 旬阳县| 阿城市| 北川| 赤水市| 讷河市| 抚州市| 营山县| 巴南区| 合江县| 仪征市| 大石桥市| 电白县| 漳平市| 威信县| 永城市| 宜兰市| 铅山县| 深泽县| 神池县| 万盛区| 西贡区| 信丰县| 保康县| 饶平县| 普安县| 蒲江县| 桦川县| 兴和县| 威宁| 绥江县| 鹤岗市| 大荔县| 沧州市| 桂林市| 九龙县| 伽师县| 隆林| 吐鲁番市|