fork download
  1. import re
  2.  
  3. message = '<@U0104FGR7SL> test111 <@U0106LSJ> test33'
  4. print ( re.split(r'\s+(?=<@U[^>]+>)', message) )
  5. print ( [x.strip() for x in re.split(r'(?=<@U[^>]+>)', message) if x] )
Success #stdin #stdout 0.02s 9616KB
stdin
Standard input is empty
stdout
['<@U0104FGR7SL> test111', '<@U0106LSJ> test33']
['<@U0104FGR7SL> test111', '<@U0106LSJ> test33']