"Joe Smith" <> wrote in message
news:ci6sji$kbk$...
> > > does anyone know of a tool that would be able to extract the regular
> > > expression that corresponds to a set of Strings?
> >
> > There is no "the" there.
> >
> > > For instance:
> > >
> > > This tool, given
> > > "abc", "aec", "akkc"
> > > would return a regular expression like "a.+c"
> >
> > Why not "a[bek].*" or "a.*"?
> >
> >
> > The real question is: which if the *infinite* number of regular
> expressions
> > that matches a given set of Strings do you want to find?
>
> Ok, ok... it's clear that my idea needs more explanations:
>
> It's true that there's an infinite number of regexps that may match a set
of
> Strings... So perhaps, what I really want is to extract the common
sections
> of these strings... And replace the other parts with the "minimum"
regexp...
> And yes, there will be countless of them!!...
> Idea:
>
> "header body1 body2 footer epilogue"
>
> "Prolog header body1 footer"
>
> I would have something like: "(Prolog)? header body1 (body2)? footer
> (epilogue)?"
>
> For instance, "diff" is able to find the differences between two files...
> The tool I'm thinking off would perform diffs on several inputs, to be
able
> to extract these common parts...
>
> But well, I guess it's too "abstract" for a program.
This is a research area, particular in user interfaces. You may find
something useful here:
http://www.ics.uci.edu/~dhilbert/pap...-ICS-98-13.pdf in section
4.4
Cheers,
Matt Humphrey
http://www.iviz.com/