private static Regex CreateRegex(ExpandedRegexDescriptor regexDescriptor) => new Regex( regexDescriptor.Pattern, regexDescriptor.Options | RegexOptions.Compiled | RegexOptions.CultureInvariant);
private static bool IsDefaultWarningRegex(ExpandedRegexDescriptor regexDescriptor) => string.Equals(regexDescriptor.Pattern, Warning.DefaultWarningPattern) && regexDescriptor.Options == RegexOptions.IgnoreCase;