API reference
Method HexColorStringRegex
- Namespace
- DisCatSharp.Common.RegularExpressions
- Assembly
- DisCatSharp.Common.dll
HexColorStringRegex()
[GeneratedRegex("^#?([a-fA-F0-9]{6})$", RegexOptions.Compiled|RegexOptions.ECMAScript)]
public static Regex HexColorStringRegex()
Returns
Remarks
Pattern:
^#?([a-fA-F0-9]{6})$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 '#' atomically, optionally. ○ 1st capture group. ○ Match a character in the set [0-9A-Fa-f] exactly 6 times. ○ Match if at the end of the string or if before an ending newline.