这个findall真是太难理解了。

还好网上找到一些参考的资料,以下这个例子还是很不错的。

主要是要搞清楚捕获的问题,如果有分组,findall就捕获各个分组的内容,有多少个分组就返回几元组;如果没有分组就捕获匹配的内容。

 

python re.compile findall non-grouping

python re.compile findall non-grouping

python re.compile findall non-grouping

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-01-14
  • 2022-12-23
  • 2022-02-15
猜你喜欢
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
相关资源
相似解决方案