|
Posted by Jim Michaels on 10/07/30 11:37
your regexp included some special characters in the ascii character set
there. also, the limit was not specified. dot must be escaped because it
normally matches any character, but I can't remember its behavior in
brackets...
preg_match("/^[A-Za-z0-9,\.]+{,250}$/",$description);
"Stefan Rybacki" <stefan.rybacki@gmx.net> wrote in message
news:40r9klF1c75tdU1@individual.net...
> Ashok wrote:
>> I want to check for regular expression a text description field, say 250
>> caracters max..
>> The field can contain only letters, numbers, comma and dot.
>> What will be the correct ereg php reg expression for this?
>> Can't figure out the proper expression.
>>
>
> something like this:
>
> preg_match("/^[A-z0-9,.]*$/",$description);
>
> Regards
> Stefan
>
>> Thanks.
>> Ashok
>>
Navigation:
[Reply to this message]
|