I'm trying to come up with a regex to extract time out of a string to build an application.
Here's what I've got so far. Not sure what am I doing wrong here.
https://regex101.com/r/fC0lI5/1
I can get some the string but not all of the different variations.
([01]?[0-9]*:?[0-9]*[AP]M?)-([01]?[0-9]*:?[0-9]*[AP]M?) 8-8:30AM MON TUES THURS FRI 8-10:30AM MON TUES THURS FRI 8:30AM-10:30AM MON TUES THURS FRI 10:30AM-11:30AM MON TUES THURS FRI 10:30AM-11:30AM MON TUES THURS FRI 8AM-8:30AM 10-11PM What I want is two captured groups. So I know that the first group is FROM time and the later one is TO time.