I'm trying to write a regex that returns a string to me
I have a full string like this:
@badges=moderator/1,premium/1;color=#00FF80;display-name=gempir;emotes=;id=d0358df2-f0a1-4600-910e-515ec52b1baa;mod=1;room-id=99659894;sent-ts=1489250823035;subscriber=0;tmi-sent-ts=1489250823211;turbo=0;user-id=77829817;user-type=mod :gempir!gempir@gempir.tmi.twitch.tv PRIVMSG #gempbot :!status
and what to find the command "PRIVMSG" because there are similar full strings that have different commands. Like this:
@ban-duration=20;ban-reason=Banned\slink;room-id=11148817;target-user-id=78424343 :tmi.twitch.tv CLEARCHAT
If you are interested these are twitch irc messages with ircv3 tags
now I have this regex:
^@(.*)\s:(.*?)tmi.twitch.tv\s
how do I use the regex or a similar one in Go to find the string im looking for?
I wanted to avoid splitting again and again because it seems kinda unreasonable and hard to read. I think a regex can fix all my problems.