4 ms·
As this thread mentions cryptic code, Perl, regexps, and primes, I'm compelled to paste the cryptic Perl regexp to determine primes: /^1?$|^(11+?)\1+$/
by Harkins 18y ago
As this thread mentions cryptic code, Perl, regexps, and primes, I'm compelled to paste the cryptic Perl regexp to determine primes:
/^1?$|^(11+?)\1+$/
- d0mine 18y agoIt is not cryptic it is just wrong. '1' is not a prime number. See my answer http://news.ycombinator.com/item?id=479514 http://news.ycombinator.com/item?id=479514