Producing all possible matches of a regular expression

不羁岁月 提交于 2019-12-01 16:24:09

问题


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?

Thanks.

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


回答1:


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



来源:https://stackoverflow.com/questions/6643730/producing-all-possible-matches-of-a-regular-expression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!