Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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+$/


It is not cryptic it is just wrong. '1' is not a prime number.

See my answer http://news.ycombinator.com/item?id=479514




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: