PHP 4.0 Bug #9619: {0,300} returns REG_BADRPT-Warning
| From: | zong64 at firemail dot de | Date: | Thu, 08 Mar 2001 11:59:22 +0000 |
| Subject: | PHP 4.0 Bug #9619: {0,300} returns REG_BADRPT-Warning | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48236@lists.php.net to get a copy of this message | ||
From: zong64@firemail.de
Operating system: Windows 98
PHP version: 4.0.4pl1
PHP Bug Type: *Regular Expressions
Bug description: {0,300} returns REG_BADRPT-Warning
$regex = "^(.*{0,300}[^ ]*).*$";
$txt = eregi_replace($regex,"\\1",$txt);
This Script was written to split a string after 300 lines and the next whitespace.
Everytime I use it, it returns the following error:
Warning: REG_BADRPT: in f:\www\test.php on line 12
(With PHP4.0.4pl1 and PHP3.?.?)
The critical part of the regex is {0,300}
Values from {0,1} to {0,99} are no problem.
But every Values bigger 99 are returning this error.
I tried to split the regex into:
$regex = "^(.*{0,50}.*{0,50}.*{0,50}.*{0,50}.*{0,50}.*{0,50}[^ ]*).*$"
But with this regex I only get a white page without any output.
--
Edit Bug report at: http://bugs.php.net/?id=9619&edit=1