生产的普通恩pression所有可能的匹配普通、pression

2023-09-11 22:42:50 作者:辞浅

由于常规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