ASP提取文章中的所有图片
2012-03-09 00:00
204 查看
提取一段内容中的所有图片或者图片地址
调用方法:
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/vince6799/article/details/6765283
<%Function RegImg(TheStr) Dim RegEx Set RegEx = New RegExp RegEx.IgnoreCase =True RegEx.Global = True RegEx.Pattern = "<img[^>]*src\s*=\s*['"&CHR(34)&"]?([\w/\-\:.]*)['"&CHR(34)&"]?[^>]*>" If Regex.test(TheStr) then Dim Matches Set Matches = RegEx.Execute(TheStr) ' 执行搜索。 For Each Match in Matches ' 遍历匹配集合。 RetStr = RetStr & Match.Value & "<br />" '获取整个img RetStr = RetStr & Match.SubMatches(0) '只取src Next RegImg = RetStr End If End Function%>
调用方法:
Response.Write RegImg("<p><img src="" http://avatar.csdn.net/E/D/9/3_vince6799.jpg"" alt=""vince6799"" />
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/vince6799/article/details/6765283
相关文章推荐
- ASP提取文章中的所有图片
- Scrapy爬取伯乐在线所有文章和图片并提取有用的数据
- asp.net正则表达式提取网页网址、标题、图片,滤所有HTML标签
- asp.net正则表达式提取网页网址、标题、图片实例以及过滤所有HTML标签实例
- asp.net正则表达式提取网页网址、标题、图片实例以及过滤所有HTML标签实例
- 提取出一篇文章里面的所有图片代码
- asp.net mvc抓取微信文章里面所有的图片
- ASP.NET正则表达式提取网页网址、标题、图片实例以及过滤所有HTML标签实例
- asp.net正则表达式提取网页网址、标题、图片,滤所有HTML标签
- 用递归做文件夹中所有文件的提取(感谢[titilima ]的文章)
- C#/.NET 如何提取PPT中的所有图片
- DEDE如何提取文章内容里面的第一张图片地址
- asp.net正则表达式提取网址、标题、图片等
- 如何提取一篇英文文章的所有单词
- asp.net 如何读取文件夹下所有图片名称
- ASP 通过正则提取信息内容种的图片
- php代码从html代码中提取出所有的图片返回数组
- c# 提取HTML中所有图片URL
- asp.net采集页面上所有图像图片资源的具体方法
- asp.net中生在文章缩略图并加入图片信息