I am trying to make javascript regex expresion that is taking time input from user. I made expression to take time from 04:00 - 04:59:
/([4]|0[4])[:.,]([0-5][0-9])[.,/;](\d)/
But now when I get to 14:00 - 14:30:
/(14)[:.,]([0-2][1-9]|10|20|30)[.,/;](\d)/
The first regex expression (from 04:00-04:59) is also taking the input from the second one. Is there any chance to separate them, so that there is not problem when user is inputing time?
-and then by:and do your required validations? You might not RegEx.