ID: 44623
User updated by: rich dot sapporo at gmail dot com
Reported By: rich dot sapporo at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: PCRE related
Operating System: Mac OS X 10.5.2
PHP Version: 5.2.5
Assigned To: fb-req-jani
New Comment:
My apologies - in my haste to get to an appointment I didn't check the
dropdown properly.
Currently using PCRE 7.3 (2007-08-28) - will try 7.6 and see if it goes
away.
Previous Comments:
------------------------------------------------------------------------
[2008-04-03 11:11:32] [EMAIL PROTECTED]
And how is this _PHP_ bug and not a PCRE bug..? Check with the command
line tool 'pcretest' first and compare to version of PCRE lib you've
compiled PHP with IF you're not using the bundled one.
------------------------------------------------------------------------
[2008-04-03 02:26:48] rich dot sapporo at gmail dot com
Description:
------------
Min/max quantifiers '{}' in preg_match() don't seem to match more than
765 characters.
Reproduce code:
---------------
// $matches[1] contains the first 765 characters of the string
$sample:
preg_match("/^(.{765}).*/", $sample, $matches);
// doesn't match anything:
preg_match("/^(.{766}).*/", $sample, $matches);
// Values from {0} to {765} appear to work fine. 766 onwards, nothing
gets matched.
Expected result:
----------------
I expect the same type of behaviour to happen in both cases.
I realize that preg_match() isn't really necessary to match the first x
characters in a string, but this problem was affecting a more complex
regex I was doing. The "matching the first x chars" example was trying
to isolate where the problem was occurring.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44623&edit=1