|
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]
|