Can a regex match valid card numbers?
Abstract Nonsense
Can a regex match valid card numbers?
We construct a [Deterministic Finite Automaton](https://en.wikipedia.org/wiki/Deterministic_finite_automaton) that recognises the set of arbitrary-length valid card numbers as per the [Luhn check digit algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) and abuse reality to derive an (executable!) regex with millions of characters.
0 comments
No comments yet.