fork(1) download
  1. import re
  2. a = '''big mouse eats cheese? "non-detected string" 'non-detected string too' hello guys'''
  3. print( [x for x in re.findall(r'''"[^"]*"|'[^']*'|\b([^\d\W]+)\b''', a) if x])
Success #stdin #stdout 0.02s 9504KB
stdin
Standard input is empty
stdout
['big', 'mouse', 'eats', 'cheese', 'hello', 'guys']