更新时间:2023-02-21 12:26:08
假设日期总是采用以下格式:[MM]-[DD]-[YYYY].
Assuming the date is always in the format: [MM]-[DD]-[YYYY].
re.search("([0-9]{2}\-[0-9]{2}\-[0-9]{4})", fileName)
Python/Regex - 如何使用正则表达式从文件名中提取日期?