Is it possible to "learn" a regular expression by user-provided examples?

Posted by DR on Stack Overflow See other posts from Stack Overflow or by DR
Published on 2009-03-05T19:34:26Z Indexed on 2010/05/22 22:30 UTC
Read the original article Hit count: 193

Is it possible to "learn" a regular expression by user-provided examples?

To clarify:

  • I do not want to learn regular expressions.
  • I want to create a program which "learns" a regular expression from examples which are interactively provided by a user, perhaps by selecting parts from a text or selecting begin or end markers.

Is it possible? Are there algorithms, keywords, etc. which I can Google for?

EDIT: Thank you for the answers, but I'm not interested in tools which provide this feature. I'm looking for theoretical information, like papers, tutorials, source code, names of algorithms, so I can create something for myself.

© Stack Overflow or respective owner

Related posts about regex

Related posts about artificial-intelligence