API reference
Method RgbColorStringRegex
- Namespace
- DisCatSharp.Common.RegularExpressions
- Assembly
- DisCatSharp.Common.dll
RgbColorStringRegex()
[GeneratedRegex("^(\\d{1,3})\\s*?,\\s*?(\\d{1,3}),\\s*?(\\d{1,3})$", RegexOptions.Compiled|RegexOptions.ECMAScript)]
public static Regex RgbColorStringRegex()
Returns
Remarks
Pattern:
^(\\d{1,3})\\s*?,\\s*?(\\d{1,3}),\\s*?(\\d{1,3})$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.
○ 1st capture group. ○ Match a character in the set [0-9] atomically at least 1 and at most 3 times. ○ Match a whitespace character (ECMA) atomically any number of times. ○ Match ','. ○ Match a whitespace character (ECMA) atomically any number of times. ○ 2nd capture group. ○ Match a character in the set [0-9] atomically at least 1 and at most 3 times. ○ Match ','. ○ Match a whitespace character (ECMA) atomically any number of times. ○ 3rd capture group. ○ Match a character in the set [0-9] atomically at least 1 and at most 3 times. ○ Match if at the end of the string or if before an ending newline.