🔅前言
import re url='https://sycm.taobao.com/bda/tradinganaly/overview/get_summary.json?dateRange=2018-03-20%7C2018-03-20&dateType=recent1&device=1&token=ff25b109b&_=1521595613462' result = re.findall(r'\d{4}-\d{1,2}-\d{1,2}',url) print(result)
结果:
import re url='https://sycm.taobao.com/bda/tradinganaly/overview/get_summary.json?dateRange=2018-03-20%7C2018-03-20&dateType=recent1&device=1&token=ff25b109b&_=1521595613462' result = re.findall(r'\d{4}-\d{1,2}-\d{1,2}',url) print(result)
结果: