3 ms·
Automatic regex generation sings a siren's song. But automatically generating regex that matches "sings," "siren," and "song" is so trivial that our minds insis
by brudgers 7y ago
Automatic 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.