Doc #53751 [Opn->Csd]: pcre pattern modifier U doesn't mention backtrack limit
| From: | vrana@php.net | Date: | Thu, 10 Feb 2011 13:03:45 +0000 |
| Subject: | Doc #53751 [Opn->Csd]: pcre pattern modifier U doesn't mention backtrack limit | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5951@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53751&edit=1
ID: 53751
Updated by: vrana@php.net
Reported by: php at richardneill dot org
Summary: pcre pattern modifier U doesn't mention backtrack
limit
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: vrana
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2011-01-15 23:21:39] php at richardneill dot org
Something like:
Ungreedy matching is normally limited to strings of < 100k characters;
this is configured by [link]pcre.backtrack_limit[/link]
A similar warning should also go in the section on regexp repetition
here:
http://uk3.php.net/manual/en/regexp.reference.repetition.php
I think it's worth putting this warning in both places, because
perl-hackers will tend to use REs like ".*?", whereas people arriving
from other languages are more likely to discover greed/laziness by
reading about the pattern-modifiers. Also, if one does exceed this
limit, PHP doesn't complain about it: not even an E_NOTICE!
Incidentally, I have no performance problem with raising this value from
100k to 100M, and I can still match a 90M character string in under 3
seconds on a netbook.
------------------------------------------------------------------------
[2011-01-15 23:08:10] frozenfire@php.net
Could you please provide more information as to what you think should be
added? If there's something that one will likely run into when using the
ungreedy modifier, which would benefit others to know, it will certainly
be added. :)
------------------------------------------------------------------------
[2011-01-14 18:22:56] php at richardneill dot org
Description:
------------
The documentation for pcre patterns
http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
has a section on Ungreediness ("U").
This ought to contain some mention of pcre.backtrack_limit
(it would have saved me many hours if it had!)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53751&edit=1