/// <summary>An easier-to-use version of <see cref="Regex.Match(string, string, RegexOptions)"/>.</summary> public static Match Match(string input, string pattern, Regex2Options options) { return Regex.Match(input, pattern, options.toStandardOpts()); }
/// <summary>An easier-to-use version of <see cref="Regex.Matches(string, string, RegexOptions)"/>.</summary> public static IEnumerable<Match> Matches(string input, string pattern, Regex2Options options) { return Regex.Matches(input, pattern, options.toStandardOpts()).Cast<Match>(); }
/// <summary>An easier-to-use version of <see cref="Regex.Match(string, string, RegexOptions)"/>.</summary> public static Match Match(string input, string pattern, Regex2Options options) { return(Regex.Match(input, pattern, options.toStandardOpts())); }
private static RegexOptions toStandardOpts(this Regex2Options opts) { return((RegexOptions)((int)opts ^ (int)RegexOptions.Singleline)); // simply toggle the Singleline option }
/// <summary>An easier-to-use version of <see cref="Regex.Matches(string, string, RegexOptions)"/>.</summary> public static IEnumerable <Match> Matches(string input, string pattern, Regex2Options options) { return(Regex.Matches(input, pattern, options.toStandardOpts()).Cast <Match>()); }