php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44062 Low limit in PCRE preg_match ?
Submitted: 2008-02-06 13:11 UTC Modified: 2008-02-06 16:44 UTC
From: janko at ami dot cz Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 5.2.5 OS: Windows XP
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: janko at ami dot cz
New email:
PHP Version: OS:

 

 [2008-02-06 13:11 UTC] janko at ami dot cz
Description:
------------
Im will try match part of HTML page. Concretely table of fixtures.


URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02

Here is code

$url = "http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02";
$content = file_get_contents($url);
preg_match('~<table cellspacing="0" cellpadding="0" class="matches">(.+)</table>~Usi', $content, $out);

//print_r($out);

echo "<table border=1>";
echo $out[1];
echo "</table>";


Everything is OK, but when I want match all fixtures, result is empty.
URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=0

Structure is the same like previous example


Can you tell me where is error?

RJ


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-06 14:41 UTC] felipe@php.net
See bug#42649
 [2008-02-06 16:44 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

preg_last_error() shows 2 (= PREG_BACKTRACK_LIMIT_ERROR).

http://docs.php.net/manual/en/pcre.constants.php
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 17:01:35 2025 UTC