Anyone help me debug this Expression. My regex is not crash hot.

var IsTime = /^([01]?[0-9]|[2][0-3])(:[0-5][0-9])?$/.test(TimeValue);

The above checks to see if a string is in the format hh:mm but I would like
it to be either hh:mm or hhmm.

I can't seem to get it to work on the last condition, anyone able to guide
me here.


Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976

Quote:
To be, or what?- Sylvester Stallone
----------------------------------------------------------------------------
--------------------------



---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to