Bug #79846 [Com]: 8c67c166996 broke simple regexp
| From: | sjon@php.net | Date: | Mon, 13 Jul 2020 12:40:02 +0000 |
| Subject: | Bug #79846 [Com]: 8c67c166996 broke simple regexp | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228001@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79846&edit=1
ID: 79846
Comment by: sjon@php.net
Reported by: sjon@php.net
Summary: 8c67c166996 broke simple regexp
Status: Open
Type: Bug
Package: PCRE related
Operating System: archLinux
PHP Version: 8.0.0alpha2
Block user comment: N
Private report: N
New Comment:
Probably the same issue also caused https://3v4l.org/ejl8v
Previous Comments:
------------------------------------------------------------------------
[2020-07-13 11:27:34] sjon@php.net
Description:
------------
I have bisected commit 8c67c166996ae1d6809f0beaf691836e37d6afc1 to fail unexpectedly on a pretty
simple regexp, see https://3v4l.org/2vTf0
pcre2test works fine implying a bug in PHP
Test script:
---------------
$item = "component_phase_1";
preg_match("/([a-z]+_[a-z]+_*[a-z]+)_?(\d+)?/", $item, $match);
var_dump($match);
Expected result:
----------------
array(3) {
[0]=>
string(17) "component_phase_1"
[1]=>
string(15) "component_phase"
[2]=>
string(1) "1"
}
Actual result:
--------------
array(0) {
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79846&edit=1