I find generating regular expressions to be difficult, tedious and error-prone.
Is there a program that can generate a regular expression given input that it must match?
for example, I give the regular expression engine this input:
must match:
foo4
baz2
bar8
does not match:
4
fo4
ba4
barr4
4bar
etc.
is this possible for complex regexes or are there too many permutations and it requires a human to guide the algorithm?