I am trying to impose a regex pattern on a text input where an user can only insert a time between 9:00 and 17:00. I have tried the following which validates any time format but I am not sure how to get certain intervals restrictions.
This is what I tried:
([0-1]{1}[0-9]{1}):[0-5]{1}[0-9]{1}
What would be the ideal regex pattern to verify that the time inserted in a text input matches the time between 9:00 and 17:00 ?