I am saving time in a sheet which can store values between 00:00
to 23:59
and 0000
to 2359
. However the regex i have used is not working. Any value which is less the 10:00
hours, e.g., 9:00
it does not work. I realized that its buggy and not upto the mark can anyone help with a proper regex or fix this one:
^(([0-2][0-3]:[0-5][0-9])|([0-1][0-9]:[0-5][0-9])|([0-9][0-5][0-9])|([0-2][0-3][0-5][0-9])|([0-1][0-9][0-5][0-9])|([0-5][0-9])|([0-9]))$
Note i need to be able to enter values without colon as well.