#44085 [Opn->Fbk]: Matching large texts

From: Date: Sat, 09 Feb 2008 16:23:50 +0000
Subject: #44085 [Opn->Fbk]: Matching large texts
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122119@lists.php.net to get a copy of this message
ID: 44085 Updated by: felipe@php.net Reported By: dimmu_bg at yahoo dot com -Status: Open +Status: Feedback Bug Type: PCRE related Operating System: linux PHP Version: 5.2.5 Previous Comments: ------------------------------------------------------------------------ [2008-02-09 16:22:55] felipe@php.net What var_dump(preg_last_error()); shows after preg_match_all() be performed? ------------------------------------------------------------------------ [2008-02-09 15:49:08] dimmu_bg at yahoo dot com Description: ------------ I tried to parse large html file - 300kb with preg_match_all. The data needed was between <!-- reg:Region_name --> / <!-- end-reg --> elements so i did this pattern #reg:(.+) -->(.+)<!-- end-reg -->#. This was working fine on old version of php (4.4) but what a surprise when upgraded to 5.2.5 ?!? It did not found any matches when the text between the reg and end-reg markers is too large. I tried moving the end-reg marker close to the reg: marker to cover smaller area of html code and it worked for enough small areas. I experimented and moved the end-reg 1 char away from the reg: and it did not returned any match. So i think this is bug and depends of the size of the text i want to match. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44085&edit=1

« previous php.bugs (#122119) next »