Matching time format with regex in Python

Report a typo

Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
Given this string
sentence = 'Moon 11:45 PM'

what regular expression patterns would correctly match the time format 'HH:MM PM/AM' in the string? (Use Python's re library)

Select one or more options from the list

Create a free account to access the full topic