Re:Automatic Generation of Regular Expressions from Examples
by __alexs on Monday October 22, 2012 @04:00PM
(#4685198)
Is a* more or less infinite than .*?
Re:Automatic Generation of Regular Expressions from Examples
by DasIch on Tuesday October 23, 2012 @01:09PM
(#4689031)
I intended `a` to mean `a` repeated zero or more times, meaning that `a` defines a language of infinite size as there are an infinite number of strings that match that grammar.
The real problem is that the space of possible solutions is very large, so you will have to do that lazily, which would make an implementation in a lot of languages rather annoying.
I'd also expect this algorithm to be biased towards regular expressions that are more specific than the user intended them to be, especially for example sets that are small or not very diverse.