can't give you an exact answer, but I would think that (code not tested, not
even sure parentethis are the best way to group tests!)
[0-1][0-9] will test for 00 to 19
2[0-3] will test for 20 to 23
[0-5][0-9] will test for 00 to 59
so (([0-1][0-9]) | (2[0-3])) : [0-5][0-9] should cover 00:00 to 23:59
Have I missed any situation?
______________________________
Franck Schmidlin
Corporate Technical Consultant
Anite Public Sector
______________________________
-----Original Message-----
From: Kaushik Pawar [mailto:kaushik_pawar@...]
Sent: 08 September 2003 15:12
To: validation@yahoogroups.com
Subject: [validation] Time Validation (24 hour format) using Regular
Expression
Hello everybody,
I am trying to build a regular expression to validate time data in 24-
hour format (without AM/PM).
It should be able to validate time strings like - 08:59, 00:30, 23:00
etc. But should invalidate 24:00, 25:87 etc...
Can anybody please help me.
Regards,
Kaushik.
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=251812.3170658.4537139.1261774/D=egroupweb/S=17050077
09:HM/A=1693352/R=0/SIG=11tralmvc/*http://www.netflix.com/Default?mqso=60178
293&partid=3170658> click here
<http://us.adserver.yahoo.com/l?M=251812.3170658.4537139.1261774/D=egroupmai
l/S=:HM/A=1693352/rand=497075396>
To unsubscribe from this group, send an email to:
validation-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk <http://www.star.net.uk>
________________________________________________________________________
DISCLAIMER: This e-mail contains proprietary information some or all of which
may be legally privileged. It is for the intended recipient only. If an
addressing or transmission error has misdirected this e-mail, please notify the
author by replying to this e-mail. If you are not the intended recipient you
must not use, disclose, distribute, copy, print, or rely on this e-mail.
_____________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
[Non-text portions of this message have been removed]