This regex doesn't tell whether a number is prime, it tells whether the length of a specially crafted string is prime.
Kind of a big difference as you can make a regex that answers any yes/no question if you preprocess the input enough.
Kind of a big difference as you can make a regex that answers any yes/no question if you preprocess the input enough.