/^1?$|^(11+?)\1+$/

| Thursday, November 19, 2009
the above regular expression could be used to check a number is prime or not! is it amazing? like a magic!

but we know there is no magic in CS.. well, this link has a great explanation.

amazing!

0 comments:

Post a Comment

Random Posts

Powered by Stuff-a-Blog