我正在使用“ Python strings split with multiple separators ”拆分字符串:
import re
DATA = "Hey, you - what are you doing here!?"
print re.findall(r'\w+', DATA)
# Prints ['Hey', 'you', 'what', 'are', 'you', 'doing', 'here']
我想获得一个单独的列表,列出匹配单词之间的内容:
[", ", " - ", " ", " ", " ", " ", "!?"]
我该怎么做呢?