Search the web
Sign In
New User? Sign Up
validation · Techniques for HTML form validation
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: Time Validation (24 hour format) using Regular E xpression   Message List  
Reply | Forward Message #297 of 427 |
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]




Mon Sep 8, 2003 2:49 pm

franck_schmi...
Offline Offline
Send Email Send Email

Forward
Message #297 of 427 |
Expand Messages Author Sort by Date

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...
Schmidlin Franck, Home
franck_schmi...
Offline Send Email
Sep 8, 2003
2:50 pm

Thanks Franck, This solves my problem as it is working fine for the conditions I want to check. This was a great help. Cheers, Kaushik. ... tested, not ... ...
Kaushik Pawar
kaushik_pawar
Offline Send Email
Sep 9, 2003
4:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help