fork(1) download
  1. import re
  2. s = "test_20200331_2020041612345678.csv"
  3. m = re.search(r"(?<=_)\d{8}(?=\d*\.)", s)
  4. if m:
  5. print(m.group())
  6.  
Success #stdin #stdout 0.02s 9572KB
stdin
Standard input is empty
stdout
20200416