Post #405
4.81K
Forwarded from Rock Neurotiko
The Codeumentary Demystifying The Regular Expression That Checks If A Number Is Prime Ever wondered how the ^.?$|^(..+?)\1+$ regular expression can tell you if a number is not prime? In this blog post you'll learn how and why it works. Code examples in Java, JavaScript, Python and Perl are provided.