I'm figuring out how get '02' and '05' or any other numbers . I've difficulty when there are letters after numbers ( for example : 'a' and 'b' or any other letters)
title = "Nursing informatics S02E05ab Jack" ->02 and 05
title = "Medical diagnosis S06E06ku Peter" ->06 and 06
title = "medical protection S01E02bc Katharina" ->01 and 02
I tried like this , but it always returns 'None'
result = re.search(r"\b(?:e?)?\s*(\d{2,3})(?:[a-z]?)?\b", title, re.IGNORECASE)
It should only get number next S and E. For example, books 2004 must return None.
Thank you all