Date: 03/13/01
- Next message: alex.dent <email protected>: "[PHP-DEV] PHP 4.0 Bug #9723: & not being encoded, invalid html"
- Previous message: dbeu <email protected>: "[PHP-DEV] PHP 4.0 Bug #9626 Updated: unable to use sybase-extension"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 9619
Updated by: dbeu
Reported By: zong64 <email protected>
Old-Status: Open
Status: Closed
Bug Type: *Regular Expressions
Assigned To:
Comments:
the regex will have to look like the following
^(.{0,99}[^ ]*).*$
the ereg functions seem only to support values > 0 & < 100 for the intervals.
use preg_replace instead of eregi_replace.
Previous Comments:
---------------------------------------------------------------------------
[2001-03-08 06:59:22] zong64 <email protected>
$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:wwwtest.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.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9619&edit=2
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: alex.dent <email protected>: "[PHP-DEV] PHP 4.0 Bug #9723: & not being encoded, invalid html"
- Previous message: dbeu <email protected>: "[PHP-DEV] PHP 4.0 Bug #9626 Updated: unable to use sybase-extension"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

