note 76288 deleted from ref.pcre by nlopess
| From: | nlopess@php.net | Date: | Fri, 27 Jul 2007 13:42:10 +0000 |
| Subject: | note 76288 deleted from ref.pcre by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-128980@lists.php.net to get a copy of this message | ||
Note Submitter: bermi
----
Be aware that PHP 5.2.0 up to 5.2.3 PCRE is buggy when using a simple regex like:
<?php
if(preg_match("/((a+)?)+/", "a")){
echo "Matched";
}
?>
Running a nested regex like this will result in a Segmentation Fault on those versions.
The bug is reported to be fixed (http://bugs.php.net/bug.php?id=41796), but think twice before
writing a regex like that one if your code needs to be compatible with these versions.