Snipplrhttp://snipplr.com/language/regex/tags/prime
Recent snippets posted on Snipplr.comen-usMon, 03 Aug 2015 06:42:52 GMT(Regular Expression) Prime number tester - banzaimanhttp://snipplr.com/view/6713/prime-number-tester/
By the legendary abigail. Fails to match if and only if it is matched against a prime number of 1's. That is, '11' fails, but '1111' does not.
I once heard him talk why this works, but I forgot most of it. ]]>Sat, 14 Jun 2008 11:02:12 GMThttp://snipplr.com/view/6713/prime-number-tester/