3 ms·
Generating regex based only on examples of the desired behavior (2015)
- brudgers 7y agoAutomatic regex generation sings a siren's song. But automatically generating regex that matches "sings," "siren," and "song" is so trivial that our minds insist on layering complexity. sings | siren | song Any other regex makes assumptions about what the example represents. Assumptions about semantics. The great thing about regular expressions is the absence of semantics. The great thing is that regular expressions are finite automata and not Turing machines.