note 76715 deleted from ref.pcre by felipe

From: Date: Mon, 10 Dec 2007 02:28:46 +0000
Subject: note 76715 deleted from ref.pcre by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133115@lists.php.net to get a copy of this message
Note Submitter: tabac (at) uu (dot) dk ---- Hello bermi <?php if(preg_match("/((a+)?)+/", "a")){ echo "Matched"; } ?> Segfault is always bad, but realize what you are asking here: "Is there one or more occurrences of zero or one sequences of one or more 'a' ?" Considering the backtracking algorithm used, the RE engine must consider if an infinite sequence of sub matches of which all but one has a length of zero. This is a bug, but it is in line with the famous "ls -l /usr/../*/../*/../*/../*/../*" bug

« previous php.notes (#133115) next »