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

Posted by Steve on 10/19/07 19:10

"AnrDaemon" <anrdaemon@freemail.ru> wrote in message
news:726079113.20071019214916@freemail.ru...
> Greetings, davranfor@gmail.com.
> In reply to Your message dated Wednesday, October 17, 2007, 23:59:49,
>
> dgc> I need a regular expression that validate a list of numbers separated
> dgc> by "-" , numbers can not be greater than 999
>
>
> dgc> Valid examples
> dgc> 0
> dgc> 12-455-01
> dgc> 1-9
> dgc> 125-32-155-45-45
>
> dgc> Invalid examples
> dgc> -1
> dgc> 45-
> dgc> 1-45665456-4
> dgc> 12-45-
> dgc> -
>
> dgc> Thanks ;)
>
> Perl one:
> ^\d{1,3}(\-\d{1,3})*$

wow...thanks for that! it wasn't like that was posted in two newsgroups 4
days ago or anything...in the exact form of:

/^\d{1,3}(?:-\d{1,3})*$/

i suppose i should just wait till someone else answers a post and a couple
of days later, post the exact freaking thing. the redundancy, i think, would
just ensure that the op reeeeealy gets it.

lol.

 

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

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