* actually pass the flags as flags in re.sub, passing re.IGNORECASE as *count* doesn't actually ignore case * ensure the entire string is matched by the pattern, or we'll get shortest-matching-pattern which is *not* what the later strptime will do closes odoo/odoo#27925