我在Python中正则表达式有点麻烦。 HTML字符串是:正则表达式非ASCII字符
html = <td style="padding-right:5px;"> <span class="blackText">Above £ 7.00 = </span> </td> <td> <span class="blackText"> <p>Free</p> </span> </td>
我想提取的 “7.00” 和 “自由”,但下面不工作:
量= re.findall(R”以上£(。*?)=',html)
Python为£符号抛出一个非ASCII错误。我将如何解决这个问题?谢谢。
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags – lolopop