擅长:python、mysql、java
<p>正则表达式可能找不到任何内容。在</p>
<p>试试这个:
同时删除末尾的/Ui</p>
<pre><code>import re
out=Data #web site html page ..
title_regex = "/<title>(.+)<\/title>/i" #no need for this .. un used
if m is not None: # NEW <
m = re.search("<title>(.+)<\/title>", out)
print "title",m.group(1)
#for pics i have tried this but it give me error ..
pics = re.match(r"<img[^>]*src=[\"|\'](.*)[\"|\']", out)
if pics is not None: # NEW <
print "grop",pics.group(1)
</code></pre>
<p>第二个问题,试试这个</p>
^{pr2}$