There can be a lot of text in the results, and though the proper result is usually the first one in the search results, I want to avoid greedily grepping for "*" as much as I can avoid it. It might return a bunch of stuff I don't want. I certainly want to search for only a single character between the digits and the AM/PM part if I can. So that way it doesn't return any results like "It was about 3:30 in the AM when the flying saucer abducted me".

I'm trying to find ways that I can get a simple yet reliable search. Oddly, the following things are behaving weirdly:

If I try to use "-i" then it doesn't work at all when I'm debugging things at my mac shell prompt.

If I try to more greedily search for other types of things, it find all the timestrings in the entire page rather than just the first one, even though I'm using "-m 1" in my grep. So I have to use "| head -n 1" at the end of my search to only return the first one.

Though something like [AP][M] works for upper case, as soon as I try to do something like [aApP][mM] it stops working and gets no results.

I'm experimenting and I'll see what I can come up with.
_________________________
Tony Fabris