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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 05:01:29 2024 UTC