Python re.findall与groupdicts

Python re.findall与groupdicts,第1张

Python re.findall与groupdicts

您可以使用finditer()函数。这将为您提供一系列匹配对象,因此您可以通过以下方式获得每个对象的groupdict:

[m.groupdict() for m in regex.finditer(search_string)]


欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/zaji/5647718.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存