#!/usr/bin/python3

import re


str="Zuletzt geändert am 17.02.2020 um 09:27 Uhr"
time=re.sub(r"Zuletzt geändert am ([.0-9]+) um ([:0-9]+) Uhr","\\1 \\2", str)
print(str, ' -> "%s"' % time)
exit(1)


value='1:22 Stunden'
value='59 Minuten'

def string_to_time(value):
    if value.endswith('Stunden'):
        return(re.sub(' *Stunden',':00',value))
    elif value.endswith('Minuten'):
        return('0:'+re.sub(' *Minuten',':00',value))
    print("Unknown unit of %s" % value)
    return None


print(string_to_time(value))
exit(1)

value='5,47 km'
# value='343 m'

def read_float_with_comma(num):
    return float(num.replace(",", "."))

def string_to_km(num):
    if value.endswith('km'):
        return(read_float_with_comma(re.sub(' *km','',value)))
    if value.endswith('m'):
        return(read_float_with_comma(re.sub(' *m','',value))/1000.)
    print("Unknown unit of %s" % value)
    return None

print(string_to_km(value))
