Table of Contents

Method GetMessageRegex

Namespace
DSharpPlus.Commands.Converters
Assembly
DSharpPlus.Commands.dll

GetMessageRegex()

[GeneratedRegex("\\/channels\\/(?<guild>(?:\\d+|@me))\\/(?<channel>\\d+)\\/(?<message>\\d+)\\/?", RegexOptions.Compiled|RegexOptions.ECMAScript)]
public static Regex GetMessageRegex()

Returns

Regex

Remarks

Pattern:

\\/channels\\/(?<guild>(?:\\d+|@me))\\/(?<channel>\\d+)\\/(?<message>\\d+)\\/?

Options:

RegexOptions.Compiled | RegexOptions.ECMAScript

Explanation:

○ Match the string "/channels/".
○ "guild" capture group.
    ○ Match with 2 alternative expressions.
        ○ Match a character in the set [0-9] atomically at least once.
        ○ Match the string "@me".
○ Match '/'.
○ "channel" capture group.
    ○ Match a character in the set [0-9] atomically at least once.
○ Match '/'.
○ "message" capture group.
    ○ Match a character in the set [0-9] atomically at least once.
○ Match '/' atomically, optionally.