I have php web application and use preg_match parse the several times out of a string.
The problem is that my users may enter the times in the following formats:
- "from 8:30 to 17:00"
- "8 to 18"
- "09:00 to 14:30"
So basically I want to get two times out of a string and each of those two times may either be given in H, HH or HH:MM.
There is a stackoverflow thread just for HH:MM, but (Regular expression for matching HH:MM time format) but none for my problem.