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)) {
^^ ^-- no need for the space
given you already have '\s'
^^
^^--- these brackets need escaping
>
avoid sticking your regexps in double quotes strings - you just end up
giving yourself an escaping headache.
what is exactly is the goal of the 'limit' you are imposing - wouldn't something
like strip_tags() be much easier?
> }
>
>
> It works well but I'm having problems with the " (double quote).
> If there is a double quote (") it fails.
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php