37,741
社区成员
发帖
与我相关
我的任务
分享import re
txt="""
<tr>
<td colspan=10 class="td-left" nowrap><b>品牌:苹果-AP
日期:2018-01-10
</b></td>
</tr>
"""
patt=re.compile(r'<b>(.*?)</b>',re.S)
res=patt.findall(txt)
resTxt=''
if len(res)>0:
resTxt=res[0].replace('\n','').replace(' ','')
print(resTxt)