A regular expression to check for prime numbers
/^1?$|^(11+?)\1+$/
/^1?$|^(11+?)\1+$/
Probably not the best algorithm to find prime numbers, but it certainly is a clever abuse of regular expressions!