* Thus wrote Yann Larrivee ([EMAIL PROTECTED]):
> Hi, i did a standard preg [A-Za-z0-9]{1,65536}
> 
> What i am simply trying to do is to validate the a form that will insert
> into my TEXT database field. So i just want to prevent a larger insert
> then expected.
> 
> 
> PHP trows me this error "preg_match(): Compilation failed: number too
> big in {} quantifier at offset 19 ..."
> 
> 
> So it appears that quantifiers are limited. Anybody knows what that
> limit is ?

It looks like it should be 65535, which makes more sense because
that is the unsigned word boundry.

if you inisist on having a 65536 limit use strlen with the preg
  if (strlen($str) <= 65536 && preg_match('/[A-Za-z0-9]+/', $str)) {

HTH, 

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to