如何使用android获取单个字符串中所有源标记的图像。下面给出(内容)字符串如何获取所有源标记图像。
"content": "<div id=\"ca-pub-8720439816564998:2475734783\" class=\"ads ads_before\"><script type=\"text/javascript\">\n google_ad_client = \"ca-pub-8720439816564998\";\n google_ad_slot = \"2475734783\";\n google_ad_width = 728;\n google_ad_height = 15;\n</script>\n<!-- New Kc 2 Link -->\n<script type=\"text/javascript\"\nsrc=\"//pagead2.googlesyndication.com/pagead/show_ads.js\">\n</script></div><h2>Mukesh Ambani & Aditi Rao Hydari inaugurate FICCI Frames 2016</h2>\n\r\n<div class=\"ngg-galleryoverview\" id=\"ngg-gallery-6892-69742\">\r\n\r\n\t<!-- Slideshow link -->\r\n\t<div class=\"slideshowlink\">\r\n\t\t<a class=\"slideshowlink\" href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?show=slide\">\r\n\t\t\t[Show as slideshow]\t\t</a>\r\n\t</div>\r\n\r\n\t\r\n\t<!-- Thumbnails -->\r\n\t\t\r\n\t<div id=\"ngg-image-145161\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145161\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-1\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-1\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-1.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145162\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145162\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-2\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-2\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-2.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145163\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145163\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-3\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-3\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-3.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145164\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145164\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-4\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-4\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-4.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145165\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145165\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-5\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-5\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-5.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145166\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145166\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-6\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-6\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-6.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145167\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145167\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-7\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-7\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-7.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145168\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145168\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-8\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-8\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-8.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145169\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145169\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-9\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-9\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-9.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145170\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145170\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-10\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-10\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-10.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145171\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145171\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-11\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-11\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-11.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145172\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145172\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-12\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-12\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-12.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145173\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145173\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-13\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-13\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-13.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145174\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145174\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-14\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-14\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-14.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145175\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145175\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-15\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-15\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-15.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145176\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145176\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-16\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-16\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-16.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145177\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145177\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-17\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-17\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-17.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145178\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145178\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-18\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-18\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-18.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145179\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145179\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-19\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-19\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-19.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t\t\r\n\t<div id=\"ngg-image-145180\" class=\"ngg-gallery-thumbnail-box\" >\r\n\t\t<div class=\"ngg-gallery-thumbnail\" >\r\n\t\t\t<a href=\"http://kalakkalcinema.com/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/?pid=145180\" title=\" \" >\r\n\t\t\t\t\t\t\t\t<img title=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-20\" alt=\"mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-20\" src=\"http://kalakkalcinema.com/wp-content/gallery/mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016/thumbs/thumbs_mukesh-ambani-aditi-rao-hydari-inaugurate-ficci-frames-2016-20.jpg\" width=\"150\" height=\"200\" />\r\n\t\t\t\t\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n\t\r\n\t\t\r\n \t \t\r\n\t<!-- Pagination -->\r\n \t<div class='ngg-clear'></div>\n \t\r\n</div>\r\n\r\n\n<p> </p>\n<p>Mukesh Ambani & Aditi Rao Hydari inaugurate FICCI Frames 2016</p>\n",
"excerpt": "<p>Mukesh Ambani & Aditi Rao Hydari inaugurate FICCI Frames 2016 Mukesh Ambani & Aditi Rao Hydari inaugurate FICCI Frames 2016</p>\n",
答案 0 :(得分:1)
你可以使用正则表达式来获取所有srcs,如下所示
String myReq = "src=(?:[\\"|\\'])(\\w*)(?:[\\"|\\'])";
Matcher m = Pattern.compile(myReq).matcher(YourString);
while (m.find()) {
System.out.println("Found: " + m.group(0));
}
如果你有图像以外的任何东西,那么你可以改变reqex以匹配这样的图像 “SRC =(?:[\” | \ '])(*。JPEG)(?:[\“| \'])”