You are here: Re: regular expression « PHP Language « IT news, forums, messages
Re: regular expression

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация