我想将字符串拆分为单词[a-zA-Z]
以及它可能包含的任何特殊字符,除了@
and #
symbols
message = "I am to be @split, into #words, And any other thing that is not word, mostly special character(.,>)"
预期结果:
['I', 'am', 'to', 'be', '@split', ',', 'into', '#words', ',', 'And', 'any', 'other', 'thing', 'that', 'is', 'not', 'word', ',', 'mostly', 'special', 'character', '(', '.', ',', '>', ')']
我怎样才能在Python中实现这一点?