3 ms·
Here are some links to papers that show how to generate regular expressions from a set of strings: - http://doi.acm.org/10.1145/1735886.1735890 http://doi.acm.o
by fdigger 13y ago
Here are some links to papers that show how to generate regular expressions from a set of strings:
- http://doi.acm.org/10.1145/1735886.1735890 http://doi.acm.org/10.1145/1735886.1735890
- http://doi.acm.org/10.1145/1841909.1841911 http://doi.acm.org/10.1145/1841909.1841911
This is research done in the context of XML schema learning.
The first paper restricts to inference of regular expressions in a more limited class: single-occurrence regular expressions. These are expressions in which every alphabet symbol (letter) can occur at most once. When enough strings are present, the algorithms are sound and complete. The second paper drops this requirement but the algorithm are mere heuristics.
Learning regular expressions from strings is a fascinating but non-trivial problem.
If you do not have access to the Digital Library of ACM, scholar.google.com is your friend.