Where PHP regex fails

(written by Lawrence Krubner, however indented passages are often quotes)

Andrei Zmievski has a post about a regex that should have detected primes, but it ran into a problem with the PHP code that handles regex.

Source