我的问题似乎是(...){min, max}的括号问题:
在PCRE时是ok的,在括号中的内容反复0或多次
'<img src=[^>]*?jpg"><BR>(<font color=red>.*?</font><BR>){0,}'
在python 3.3中的re
上面的式子是可以找到的,但传回值只有括号内的内容,前面的<img src....><BR>
却不见了
p=re.compile('<img src=[^>]*?jpg"><BR>(<font color=red>.*?</font><BR>){0,}')
hlist=p.findall(test_string)