fork(1) download
  1. # your code goes here
  2.  
  3. import re
  4.  
  5. s = "badges: @badges=;color=;display-name=;emotes=;message-id=34;thread-id=5575526_123681740;turbo=0;user-id=5575526;user-type= :teonnyn!teonnyn@teonnyn.tmi.twitch.tv WHISPER blastweb :Hello Bot"
  6.  
  7. matches = re.findall(r'user-type=\s+:(\w+)!.*:([\S\s]+)', s)
  8.  
  9. print(matches)
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
[('teonnyn', 'Hello Bot')]