Brick icon

twitch regex strings

Brick | PRO | 09/27/15 12:47:34 AM UTC | 0 ⭐ | 341 👁️ | Never ⏰ | []
C# |

1.98 KB

|

None

|

0 👍

/

0 👎

    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>.+)$";
    private const string ModeMatch = ":jtv MODE #\\S+ (?<change>[+-])o (?<user>\\S+)";
    private const string PingMatch = "PING :(?<ip>\\S+)";
    private const string TimeoutMatch = ":tmi\\.twitch\\.tv CLEARCHAT #\\S+ :(?<user>\\S+)";
    private const string NotifyMatch = ":[email protected] PRIVMSG #\\S+ :(?<message>.+)";
    private const string CapAckMatch = ":tmi\\.twitch\\.tv CAP \\* ACK :(?<cap>.+)";
    private const string CodeMatch = ":tmi\\.twitch\\.tv (?<code>\\d{3}) \\S+ :(?<message>.+)";
    private const string Code2Match = ":\\S+\\.tmi\\.twitch\\.tv (?<code>\\d{3}) \\S+ = #\\S+ :(?<message>.+)";
    private const string Code3Match = ":\\S+\\.tmi\\.twitch\\.tv (?<code>\\d{3}) \\S+ #\\S+ :(?<message>.+)";
    private const string JoinMatch = ":\\S+!\\S+@(?<name>\\S+)\\.tmi\\.twitch\\.tv JOIN #\\S+";
    private const string PartMatch = ":\\S+!\\S+@(?<name>\\S+)\\.tmi\\.twitch\\.tv PART #\\S+";
    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";
    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+";
    private const string RoomStateMatch = "@broadcaster-lang=(?<lang>\\S+)?;r9k=(?<isr9k>\\d);slow=(?<isslow>\\d+);subs-only=(?<issub>\\d) :tmi\\.twitch\\.tv ROOMSTATE #\\S+";
    private const string NoticeMatch = "@msg-id=(?<msgid>\\S+) :tmi\\.twitch\\.tv NOTICE #\\S+ :(?<message>.+)";

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎