The Prime That Wasn't
zmievski.org
zmievski.org
Granted, it's smart that PHP does have a default backtrack limit. I believe this would have prevented errors like the django forms DoS vulnerability from a while back.
It appears they punt on the particular issue of regex's running out of memory though. Developers are told "careful crafting of the regular expressions can help," and told to read "Mastering Regular Expressions."
As I recall, Boost's regex library will throw an exception if evaluation of the regex is getting out of hand.
It's funny, I generally judge a regex library on how compatible it is with perl's implementation. In this case though, I might actually prefer the behavior of Boost and PCRE.
And you use the preg_last_error() function to see it.
The return false is for php errors (i.e. programming errors, which also raise warnings), not library errors.
$; # A lone dollar?
=$"; # Pod?
$; # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print%; # No right operand for %?