The Prime That Wasn't

A great post about a simple algorithm that determines whether a number is prime. Of course, its simplicity does not imply quick runtime. Regardless, the algorithm ingeniously uses regex patterns to test for factorization. The article, I think, is more interesting in that it uncovers a bug in PHP's regular expression matching algorithm as the regex relies on backtracking.