Possible Duplicate:
How to determine if a number is a prime with regex?
This page claims that this regular expression discovers non-prime numbers (and by counter-example: primes):
/^1?$|^(11+?)\1+$/
How does this find primes?
Possible Duplicate:
How to determine if a number is a prime with regex?
This page claims that this regular expression discovers non-prime numbers (and by counter-example: primes):
/^1?$|^(11+?)\1+$/
How does this find primes?