ID:               50618
 User updated by:  sarun37823 at bigfoot dot com
 Reported By:      sarun37823 at bigfoot dot com
 Status:           Open
 Bug Type:         PCRE related
 Operating System: Linux
 PHP Version:      5.2.12
 New Comment:

I just test code above with php 5.2.5 on WinXP
It's work fine.


Previous Comments:
------------------------------------------------------------------------

[2009-12-31 07:43:42] sarun37823 at bigfoot dot com

Add:
I think it's about * in (?:.(?!made an edit|<\/?li))*
Main Idea of this regular expression is to replace
<li> to </li> with no li tag inside and with "made an
edit" string

------------------------------------------------------------------------

[2009-12-31 07:17:57] sarun37823 at bigfoot dot com

if there's no <li></li> in test file
or i just replace <li></li> with <li><!--something--></li>
It can work properly.

------------------------------------------------------------------------

[2009-12-31 06:11:21] sarun37823 at bigfoot dot com

Description:
------------
I use preg_replace It work fine for most subject(data)
except one.

Reproduce code:
---------------
<?php
$page_c=implode('', file('phpbug1.data'));
//download test file at
//http://www.greatduo.da.ru/files/phpbug1.data
$page_c=preg_replace('/<li[^<>]*>(?:.(?!made an
edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c);
?>

Expected result:
----------------
blank page

Actual result:
--------------
Error: Zero Sized Reply


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50618&edit=1

Reply via email to