Re: preg, patern quantifier limit

From: Date: Fri, 01 Aug 2003 21:38:53 +0000
Subject: Re: preg, patern quantifier limit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158008@lists.php.net to get a copy of this message
Hello, This is a reply to an e-mail that you wrote on Fri, 1 Aug 2003 at 20:35, lines prefixed by '>' were originally written by you. > 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 ? I can't help with your actual question, but I just thought I would mention you can do what you are trying to do with... if(strlen($text)>65536){ // too big } http://php.net/strlen David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP)

« previous php.general (#158008) next »