I am totally aware of the fact that it is not a really solvable task, but I would like to make (well..., have) something that generates a regular expression based on 2 or more strings. Or the most strict regular expression possible or something...
So if you would feed it "a123" and "345b" it should return something like /a?\d{3}b?/.
There is a plethora of very difficult problems that you'll run into of course.
Like e.g. in the above case /[a3][14][25][3b]/ would be stricter. And at the other side of the spectrum /.*/ will always work.
However it can't be the case that I am the first one thinking about this.
Does anybody have any starting points like links/pointers to literature about this..?!?
So if you would feed it "a123" and "345b" it should return something like /a?\d{3}b?/.
There is a plethora of very difficult problems that you'll run into of course.
Like e.g. in the above case /[a3][14][25][3b]/ would be stricter. And at the other side of the spectrum /.*/ will always work.
However it can't be the case that I am the first one thinking about this.
Does anybody have any starting points like links/pointers to literature about this..?!?