php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41299 preg_match_all cannot matches long string
Submitted: 2007-05-06 04:40 UTC Modified: 2007-05-06 10:32 UTC
From: virteman at hotmail dot com Assigned:
Status: Not a bug Package: *Regular Expressions
PHP Version: 5.2.2 OS: windows and linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 - 38 = ?
Subscribe to this entry?

 
 [2007-05-06 04:40 UTC] virteman at hotmail dot com
Description:
------------
This code read a file(bcgm.txt) and use regex to process the content,then write a new file(yes.txt)! I try it on PHP5.1.6,the result is just fine,but If I run it on PHP2.X the result file is bad and just a NULL in the file.
    And Then ,I try other method ,Let the content short ,it's also OK,but let the content keep very long,the problem is still.
    

    preg_match_all() cannot matches very long string.

Reproduce code:
---------------
http://forideal.blog.163.com/blog/

Expected result:
----------------
one new file,which contains the result string.

Actual result:
--------------
But in the file just is "null".

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-06 10:32 UTC] tony2001@php.net
See http://php.net/preg_last_error and related INI options.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 17:03:14 2021 UTC