On Thu, December 14, 2006 11:47 pm, WeberSites LTD wrote:
> I'm trying to limit the text someone can submit in a text area with :
>
>
> Code:
> if(!preg_match("/^[à-úA-Za-z0-9_():,@\/\.\s\-\" ]*$/i",$FieldValue)) {
>
> }
>
>
> It works well but I'm having problems with the " (double quote).
> If there is a double quote (") it fails.Fails in what way? Are you sure you are remembering to do http://php.net/htmlentities on the data you send out for the TEXTAREA to pre-populate it? Does PCRE need " escaped inside the [] bit? I think not, but I suppose \\" instead of \" couldn't hurt. You may also want to move the - to the end of [] character set and lose the \, just to keep it simpler. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

