I have found a working expression for accepting only 24 hour time, but my problem is it will accept things before and after such as characters
- awf23:59fawf
- 23:59gfes
- 123:59 Are all accepted, I want to stop allowing this and only accept HH:MM within my statement:
if (preg_match_all("~((2[0-3]|[01][1-9]|10):([0-5][0-9]))~", $time)) {