fork download
  1. import re
  2. p = re.compile(r'(?<!-)\b\d+\b(?!-)')
  3. s = "2016-03-29\n7\n46\n8\n43\n9\n47"
  4. print(p.findall(s))
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
['7', '46', '8', '43', '9', '47']