fork download
  1. # your code goes here
  2.  
  3. import re
  4.  
  5. dates = """Nov. 4, 2015Bangladesh
  6. April 8, 2015Saudi Arabia
  7. Jan. 14, 2016Indonesia
  8. June 26, 2015Tunisia
  9. Jan. 11, 2016France"""
  10.  
  11. print re.findall(r'^(.*\d{4})', dates, re.M)
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
['Nov. 4, 2015', 'April 8, 2015', 'Jan. 14, 2016', 'June 26, 2015', 'Jan. 11, 2016']