我的字符串看起来像这样:
“侠盗猎车手V (5)”border="0“src="/product_images/Gaming/Playstation4 Software/5026555416986_s.jpg”title="Grand... (字符串将在此处继续一段时间)
我想使用正则表达式来获取: /product_images/Gaming/Playstation4 Software/5026555416986_s.jpg
基本上,src=中的所有内容都是“...”
目前,我使用re.findall(r'"(^"*)"‘行)生成一个列表,并获取适当的列表,但是完整字符串中有很多引号,我希望更高效。
有没有人能帮我组织一个这样的表达呢?
发布于 2017-08-18 01:00:16
发布于 2017-08-18 02:12:28
将此代码用作RE:
src="(.+?)“
这将返回您想要的结果。
re.findall('src="(.+?)"', text_to_search_from)https://stackoverflow.com/questions/45740972
复制相似问题