1. #### Time Regex Problem

I'm using this to validate a time value.

/^(([0-1][0-9]|2[0-3])[+][0-5][0-9])\$/

So, 23+59 is good, but 28+66 is not.

I'd like the first digit of the hour block to be optional such that something like 3+35 validates.

The way I have it, 3+35 does not validate, but 03+45 does.

I'm unsure how to make that first digit optional.

Ideas?
2. You already have the hour broken into 00-19 and 20-23. Break it further into 00-09, 10-19, and 20-24, then make the 0 in the first set optional.
3. This seems to work, though it might not be the correct way. I tested it with a bunch of good and bad inputs...

/^(([0-1]?[0-9]|2[0-3])[+][0-5][0-9])\$/'
4. Yeah, I suppose that's easier than what I said

Compare what it allowed before and after:
Before: [0-1] * [0-9] = 0[0-9] + 1[0-9] = 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19
After: ([0-1] + empty) * [0-9] = 0[0-9] + 1[0-9] + [0-9] = 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9

Looks good to me.