Write haof XML files: Gran Causa
(
grancausa-php(EN)yahoo.com)
Fecha: mié 09 mar 2005 - 12:17:29 CET
> He detectado un problema usando
EREGI
> Si uso esta sentencia no hay
ningún problema:
> if (!eregi('([a-z]{3,255})',
$texto)) {$error = 1;}
> Pero si uso un valor mayor que 255
me salta error.
> La cuestión, es que
necesito usar un valor de 500.
> ¿Qué alternativas se
os ocurren?
Sin duda preg_match: http://es2.php.net/preg_match
if (!preg_match('/[a-z]{3,255}/i', $texto)) $error = 1;
Las regex en perl (PCRE, Perl Compatible Regular
Expressions) funcionan más completas y bien
desde siempre. Hace tiempo que me he olvidado de ereg* de PHP
;-)
echo 'Saludos';
-- PHP Spanish Localization Talk Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Este archivo fue generado por hypermail 2.1.7 : sáb 19 mar 2005 - 01:01:24 CET