fork(2) download
  1. import re
  2. s = "The river *runs slowly* but surely"
  3. res = re.findall(r'\*[^*]*\*|(\w+)', s)
  4. print(list(filter(None, res)))
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
['The', 'river', 'but', 'surely']