生产的普通恩pression所有可能的匹配 [英] Producing all possible matches of a regular expression

查看:152
本文介绍了生产的普通恩pression所有可能的匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于常规EX pression,我想制作一组字符串,经常EX pression将匹配的。要注意的是这组不会无限因为会有最大长度为每个字符串是重要的。是否有任何众所周知的算法到位做到这一点?是否有任何的研究论文,我可以理解为深入了解这个问题?

Given a regular expression, I want to produce the set of strings that that regular expression would match. It is important to note that this set would not be infinite because there would be maximum length for each string. Are there any well known algorithms in place to do this? Are there any research papers I could read to gain insight into this problem?

感谢。

P.S。请问这样的问题更恰当的理论CS堆叠交换?

p.s. Would this sort of question be more appropriate in the theoretical cs stack exchange?

推荐答案

在Perl的世界里,我们有不只是在CPAN模块 - >的正则表达式:: GENEX

In the Perl world we have a module on CPAN that does just that -> Regexp::Genex

这篇关于生产的普通恩pression所有可能的匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆