From: Robert Dober Date: 2006-04-06T22:17:54+09:00 Subject: Re: String generalization ------=_Part_3894_6934082.1144329469312 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/6/06, Peter Szinek wrote: > > SNIP ---------------- Really? (I am new here, begun to learn Ruby 2 weeks ago) - i have seen > Ruby Quiz but did not know that anybody can post problems... (And if it > gets solved, this way "outsorce" a task from his full-time job tasklist > ;-) > > Best wishes, > Peter > > Well James reads this list frequently, he will tell us, I guess ;) But my idea is the following. * Give some constraints about how different sets of example strings would influence each other. * Define a test suite f.e. I think along these lines If the program has only one string "acccd" it will generalize to ".+" if you give a second one [ "addff", "" ] it will generalize to ".*" if you give the following data [ "129", "0x1ef" ], ["add", ""] it shall create "\d+|0x[0-9a-f]+", ".*" etc. etc. Believe me this is more than challanging and maybe a *real* good definition of the problem is more difficult than the solution. Cheers Robert -- Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_3894_6934082.1144329469312--