A place for long-form blog posts.
Can a regex match valid card numbers?
We construct a Deterministic Finite Automaton that recognises the set of arbitrary-length valid card numbers as per the Luhn check digit algorithm and abuse reality to derive an (executable!) regex with millions of characters.