All, a regex for a form validation function is needed to determine whether a user's input for a daily time (24h format, always with the timezone) or an interval is OK. There are 5 possible time zones (4 continental US + UTC as suffixes), and 2 interval types (can be float, h or m suffixes). A few examples for valid inputs are
- 0:30EST (Half past midnight, eastern time)
- 22:15MST (22:15, Mountain time)
- 12.5m (interval of 12.5 minutes)
Accepted answer here was a good start, but i couldn't quite get the time zone suffix regex to work, or to add an alternation for the interval case.
For reference, required timezones would be EST,CST,MST,PST and UTC. Or course, any example with a couple of time zones is enough, can always be extended if other SO readers find it useful.
Any ideas?