在StackOverflow的播客之一(一个人在那里讨论了数据生成测试数据块 - 无论是的#11 或#12 ),杰夫提到类似反常规EX pressions,这是完全用于这个目的:给定一个正则表达式,产生一个字符串,最终将比赛表示正则表达式
In one of the StackOverflow Podcasts (the one where guys were discussing data generation for testing DBs -- either #11 or #12), Jeff mentioned something like "reverse regular expressions", which are used exactly for that purpose: given a regex, produce a string which will eventually match said regex.
什么是正确的术语,这整个概念?这是一个众所周知的概念?
What is the correct term for this whole concept? Is this a well-known concept?
在Perl模块字符串::随机
(在CPAN)来实现的。注意到经常EX pressions的一个子集,并通过它做了随机游走。
The Perl module String::Random
(in the CPAN) does this. Takes a subset of regular expressions, and does a random walk through it.