|
Posted by AnrDaemon on 10/19/07 17:49
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})*$
--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>
Navigation:
[Reply to this message]
|