1 person found this helpful
This is what you have now:
That is, EITHER one or more digits, followed by a literal(!) open bracket and an 'a', OR a 'p' followed by an 'm' followed by an optional closing bracket.
What you want is more something like this (untested!):
a group of
some digits, optionally followed by
a colon and more digits
followed by either a 'p' or an 'a'
followed by an 'm'
optionally followed by a hyphen
repeated ad infinitum
The optional hyphen at the end is to cater for "9am-10am", which would be a time, followed by that optional hyphen, then followed once more by the entire oattern but without the hyphen. You can see this if you accidentally entered "9am-10am-" somewhere; the hyphen at the end will also be included.
I assume you want everything formatted then, including the hyphen? If so, Jongware's solution is dead on (tested!)...no surprise there!
I used his expression on the following:
It worked beautifully.
At first I thought I was doing something wrong when I tried Jongware's solution but I didn't realize there was an extra space between the first opening parenthesis and the first backward slash that I needed to remove.
Thank you Adobe community for your input!!