Need some help with regex for extracting time from the following string:
3:00 am - 4:00 pm Transform data blah blah blah
or
3:00 am Transform data blah blah blah
Following regex works for the first format but it does not work for the second format: /\d{1,2}:\d\d\s([AaPp][Mm])?\s?-?\s\d{1,2}:\d\d\s([AaPp][Mm])/g