Advertisement
Brick

twitch regex strings

Sep 26th, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.98 KB | None | 0 0
  1.     private const string MessageMatch = "^@color=(?<color>#\\w{6})?;display-name=(?<name>[^;]+)?;emotes=(?<emote>[^;]*);(?:sent-ts=\\d+;)?subscriber=(?<issub>\\d);(?:tmi-sent-ts=\\d+;)?turbo=(?<isturbo>\\d);user-type=(?<usertype>\\S*) :(?<secondname>\\S+)!\\S+@\\S+.tmi.twitch.tv PRIVMSG #\\w+ :(?<message>.+)$";
  2.     private const string ModeMatch = ":jtv MODE #\\S+ (?<change>[+-])o (?<user>\\S+)";
  3.     private const string PingMatch = "PING :(?<ip>\\S+)";
  4.     private const string TimeoutMatch = ":tmi\\.twitch\\.tv CLEARCHAT #\\S+ :(?<user>\\S+)";
  5.     private const string NotifyMatch = ":twitchnotify!twitchnotify@twitchnotify.tmi.twitch.tv PRIVMSG #\\S+ :(?<message>.+)";
  6.     private const string CapAckMatch = ":tmi\\.twitch\\.tv CAP \\* ACK :(?<cap>.+)";
  7.     private const string CodeMatch = ":tmi\\.twitch\\.tv (?<code>\\d{3}) \\S+ :(?<message>.+)";
  8.     private const string Code2Match = ":\\S+\\.tmi\\.twitch\\.tv (?<code>\\d{3}) \\S+ = #\\S+ :(?<message>.+)";
  9.     private const string Code3Match = ":\\S+\\.tmi\\.twitch\\.tv (?<code>\\d{3}) \\S+ #\\S+ :(?<message>.+)";
  10.     private const string JoinMatch = ":\\S+!\\S+@(?<name>\\S+)\\.tmi\\.twitch\\.tv JOIN #\\S+";
  11.     private const string PartMatch = ":\\S+!\\S+@(?<name>\\S+)\\.tmi\\.twitch\\.tv PART #\\S+";
  12.     private const string GlobalUserStateMatch = "@color=(?<color>#\\d{6})?;display-name=(?<name>\\S+);emote-sets=(?<emotesets>\\S+);turbo=(?<isturbo>\\d);user-type=(?<usertype>\\S*) :tmi\\.twitch\\.tv GLOBALUSERSTATE";
  13.     private const string UserStateMatch = "@color=(?<color>#\\d{6})?;display-name=(?<name>\\S+);emote-sets=(?<emotesets>\\S+);subscriber=(?<issub>\\d);turbo=(?<isturbo>\\d);user-type=(?<usertype>\\S*) :tmi\\.twitch\\.tv USERSTATE #\\S+";
  14.     private const string RoomStateMatch = "@broadcaster-lang=(?<lang>\\S+)?;r9k=(?<isr9k>\\d);slow=(?<isslow>\\d+);subs-only=(?<issub>\\d) :tmi\\.twitch\\.tv ROOMSTATE #\\S+";
  15.     private const string NoticeMatch = "@msg-id=(?<msgid>\\S+) :tmi\\.twitch\\.tv NOTICE #\\S+ :(?<message>.+)";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement