I've already read this and this and this and lots of others. They don't answer to my problem.
I'd like to filter a string that may contain emails or strings starting by "@" (like emails but without the text before the "@"). I've tested many ones but one of the simplest that begins to get close is:
import re
re.split(r'(@)', "test @aa test2 @bb @cc t-es @dd-@ee, test@again")
Out[40]:
['test ', '@', 'aa test2 ', '@', 'bb ', '@', 'cc t-es ', '@', 'dd-', '@', 'ee, test', '@', 'again']
I'm looking for the right regexp that could give me:
['test ', '@aa', 'test2 ', '@bb ', '@cc', 't-es ', '@dd-', '@ee', 'test@again']