note 55233 deleted from function.ereg by vincent
| From: | vincent@php.net | Date: | Thu, 28 Jul 2005 08:48:35 +0000 |
| Subject: | note 55233 deleted from function.ereg by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92614@lists.php.net to get a copy of this message | ||
Note Submitter: crownedgrouse
Reason: non-english
----
Attention !
var_dump(ereg("(toto){1,256}","totototo")) ;
Renvoi bool(false)
Alors qu'il devrait renvoyer bool(true).
La raison : un warning :
Warning: ereg() [http://www.php.net/function.ereg]: REG_BADBR in Command line code on line 1
Par contre :
var_dump(ereg("(toto){1,255}","totototo")) ;
fonctionne correctement.
Moralité : Si une chaîne doit se répéter plus de 255 fois, il faut découper en plusieurs
répétition, par exemple pour 256 :
var_dump(ereg("((toto){1,128}){1,2}","totototo")) ;