Table of Contents
API reference

Method WebhookRegex

Namespace
DisCatSharp.Common.RegularExpressions
Assembly
DisCatSharp.Common.dll

WebhookRegex()

[GeneratedRegex("(?:https?:\\/\\/)?(www\\.|canary\\.|ptb\\.|staging\\.)?(discord|discordapp)(\\.com|\\.co)\\/api\\/(?:v\\d\\/)?webhooks\\/(?<id>\\d+)\\/(?<token>[A-Za-z0-9_\\-]+)", RegexOptions.Compiled|RegexOptions.ECMAScript)]
public static Regex WebhookRegex()

Returns

Regex

Remarks

Pattern:

(?:https?:\\/\\/)?(www\\.|canary\\.|ptb\\.|staging\\.)?(discord|discordapp)(\\.com|\\.co)\\/api\\/(?:v\\d\\/)?webhooks\\/(?<id>\\d+)\\/(?<token>[A-Za-z0-9_\\-]+)

Options:<br />
<pre><code class="lang-csharp">RegexOptions.Compiled | RegexOptions.ECMAScript</code></pre><br />
Explanation:<br />
<pre><code class="lang-csharp">○ Optional (greedy).
○ Match the string "http".
○ Match 's' atomically, optionally.
○ Match the string "://".

○ Optional (greedy). ○ 1st capture group. ○ Match with 4 alternative expressions. ○ Match the string "www.". ○ Match the string "canary.". ○ Match the string "ptb.". ○ Match the string "staging.". ○ 2nd capture group. ○ Match the string "discord". ○ Match with 2 alternative expressions. ○ Match an empty string. ○ Match the string "app". ○ 3rd capture group. ○ Match the string ".co". ○ Match with 2 alternative expressions. ○ Match 'm'. ○ Match an empty string. ○ Match the string "/api/". ○ Optional (greedy). ○ Match 'v'. ○ Match a character in the set [0-9]. ○ Match '/'. ○ Match the string "webhooks/". ○ "id" capture group. ○ Match a character in the set [0-9] atomically at least once. ○ Match '/'. ○ "token" capture group. ○ Match a character in the set [-0-9A-Z_a-z] atomically at least once.