A
A
Albert2019-10-26 07:44:23
Regular Expressions
Albert, 2019-10-26 07:44:23

How to create an auto generator of regular expressions (regex)?

There is a desire to create an auto generator of regular expressions (regex).
The idea is as follows: the program (function) receives an input and output string (or several such pairs) and returns the most suitable regex expression.
Expressions will be simple (consisting of a small number of elements).
The goal is to make life easier for beginners in regex (I attribute myself there, so I don’t exclude that the idea may be naive) I’m
interested in examples of analogues, as well as how best to implement this and what are the main pitfalls.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2019-10-26
@longclaps

The main pitfall - now I'll get it out of the water for you - and so, the main stone is your unwillingness to study the documentation, "disguised" by the goal of "making life easier for beginners".
John Friedl's book "Regular Expressions" and a lot of services like regex101 will help you get out of the way and get down to business.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question