def filter_by_dates(files_or_folders: list, date_fmt=DATE_FMT) -> list:
r = re.compile(f'<STR_LIT>')<EOL>return list(filter(<EOL>lambda vv: r.match(vv.replace('<STR_LIT:\\>', '<STR_LIT:/>').split('<STR_LIT:/>')[-<NUM_LIT:1>]) is not None,<EOL>files_or_folders,<EOL>))<EOL>
Filter files or dates by date patterns

Args:
    files_or_folders: list of files or folders
    date_fmt: date format

Returns:
    list