加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

是否有Perl相当于Python的re.findall / re.finditer(迭代正则表

发布时间:2020-12-15 21:16:04 所属栏目:大数据 来源:网络整理
导读:在Python中编译的正则表达式模式 have a findall method执行以下操作: Return all non-overlapping matches of pattern in string,as a list of strings. The string is scanned left-to-right,and matches are returned in the order found. If one or mor
在Python中编译的正则表达式模式 have a findall method执行以下操作:

Return all non-overlapping matches of
pattern in string,as a list of
strings. The string is scanned
left-to-right,and matches are
returned in the order found. If one or
more groups are present in the
pattern,return a list of groups; this
will be a list of tuples if the
pattern has more than one group. Empty
matches are included in the result
unless they touch the beginning of
another match.

在Perl中执行此操作的规范方法是什么?我能想到的一个天真的算法是“当搜索并用空字符串替换成功时,做[套件]”.我希望有一个更好的方式.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读