15 lines
258 B
Python
15 lines
258 B
Python
|
#!/usr/bin/python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import re
|
||
|
|
||
|
|
||
|
def extract_minutes(string):
|
||
|
pattern = r'^([0-9]|1[0-9]|2[0-3]):([0-5][0-9])$'
|
||
|
out = re.search(pattern, string)
|
||
|
|
||
|
if out is None:
|
||
|
return '<NONE>'
|
||
|
else:
|
||
|
return out.group(2)
|