php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63751 PCRE failed to match some expressions
Submitted: 2012-12-12 12:07 UTC Modified: 2012-12-14 22:41 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: cosechy at gmail dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 5.5Git-2012-12-12 (snap) OS: Ubuntu 12.04 Precise
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cosechy at gmail dot com
New email:
PHP Version: OS:

 

 [2012-12-12 12:07 UTC] cosechy at gmail dot com
Description:
------------
See the example below

Test script:
---------------
<?php
var_dump(preg_match(
    "/a([bc]*|[^bc])*X|A/",
    "abbbbbbcccccccccc...A",
    $m));
var_dump($m);

//this pattern is equal to "/a([bc]|[^bc])*X|A/", which works well

Expected result:
----------------
int(1)
array(1) {
  [0]=>
  string(1) "A"
}


Actual result:
--------------
bool(false)
array(0) {
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-14 22:41 UTC] felipe@php.net
Hi, in such situation, check out preg_last_error() return value to diagnostic what have happened. Not a PHP bug.
 [2012-12-14 22:41 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Feb 12 09:00:01 2026 UTC