public DynamicRegexArticleComparer(string comparator, RegexOptions options) { Comparator = comparator; Options = (options & ~RegexOptions.Compiled); // Create a regex to try it out. Throws an exception if there's a regex error new Regex(Tools.ApplyKeyWords("a", comparator), options); }