|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-03 11:11 UTC] jani@php.net
[2008-04-03 11:25 UTC] rich dot sapporo at gmail dot com
[2008-04-03 14:14 UTC] jani@php.net
[2008-04-11 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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.