Menu

#1 Regular expression generator

open
dchilot
regexp (1)
5
2010-09-04
2010-09-04
dchilot
No

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.

Discussion

  • dchilot

    dchilot - 2010-09-04
    • assigned_to: nobody --> dchilot
     
  • dchilot

    dchilot - 2010-11-29

    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).

     
  • dchilot

    dchilot - 2010-11-29

    [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.

     
  • dchilot

    dchilot - 2011-12-29

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.