Test, validate and match regular expressions
Matches time strings at the start of a line, capturing hours (1-2 digits), minutes, and seconds (0-2 digits each) with flexible separators (colon, dot, or space), plus an optional AM/PM marker like 'am', 'p.m.', or 'PM'. Useful for parsing loosely-formatted times such as '12:30:45 pm', '1.30', or '10 45 am' from logs or user input. Because minutes, seconds, and the meridiem are optional, it also matches partial times like a lone hour.