The goal is to have a library that will generate a regular expression based on sample strings. Of course the regular expression generated have to match the sample strings. The regular expressions' format should be python compliant. Various improvements may be scheduled in the future.
Now it works when parts in the regular strings have the same length; otherwise the result is quite useless. The next step would be to have a variable length computed for each group (make a digits group for instance even if it is not of the same length in all sample strings).
[fixing previous comment]
Now it works when parts in the sample strings have the same length,
otherwise the result is quite useless. The next step would be to have a
variable length computed for each group (for instance, make a digits group
even if it is not of the same length in all sample strings), something more dynamic to adapt to more situations.
With the latest commit it is not working too bad (even with strings of various lengths). The program would need to be put against real life cases to check how it fares.