newmediamonitoring/test.py

4 lines
82 B
Python

import re
s = '2020-10-9'
mat = re.search(r"(\d{4}-\d{1,2}-\d{1,2})",s)
print(mat)