API reference
Method TimestampRegex
- Namespace
- DisCatSharp.Common.RegularExpressions
- Assembly
- DisCatSharp.Common.dll
TimestampRegex()
[GeneratedRegex("^<t:(?<timestamp>-?\\d{1,13})(:(?<style>[tTdDfFR]))?>$", RegexOptions.Compiled|RegexOptions.ECMAScript)]
public static Regex TimestampRegex()
Returns
Remarks
Pattern:
^<t:(?<timestamp>-?\\d{1,13})(:(?<style>[tTdDfFR]))?>$Options:<br />
<pre><code class="lang-csharp">RegexOptions.Compiled | RegexOptions.ECMAScript</code></pre><br />
Explanation:<br />
<pre><code class="lang-csharp">○ Match if at the beginning of the string.
○ Match the string "<t:". ○ "timestamp" capture group. ○ Match '-' atomically, optionally. ○ Match a character in the set [0-9] greedily at least 1 and at most 13 times. ○ Optional (greedy). ○ 1st capture group. ○ Match ':'. ○ "style" capture group. ○ Match a character in the set [DFRTdft]. ○ Match '>'. ○ Match if at the end of the string or if before an ending newline.