note 76715 added to ref.pcre

From: Date: Fri, 27 Jul 2007 13:19:41 +0000
Subject: note 76715 added to ref.pcre
Groups: php.notes 
Request: Send a blank email to php-notes+get-128979@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.197 Probable Submitter: 193.88.184.3 (proxied: 193.88.250.142) ---- Manual Page -- http://www.php.net/manual/en/ref.pcre.php Edit -- https://master.php.net/note/edit/76715 Del: integrated -- https://master.php.net/note/delete/76715/integrated Del: useless -- https://master.php.net/note/delete/76715/useless Del: bad code -- https://master.php.net/note/delete/76715/bad+code Del: spam -- https://master.php.net/note/delete/76715/spam Del: non-english -- https://master.php.net/note/delete/76715/non-english Del: in docs -- https://master.php.net/note/delete/76715/in+docs Del: other reasons-- https://master.php.net/note/delete/76715 Reject -- https://master.php.net/note/reject/76715 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128979) next »