Example #1
0
 /// <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());
 }
Example #2
0
 /// <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>();
 }
Example #3
0
 /// <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()));
 }
Example #4
0
 private static RegexOptions toStandardOpts(this Regex2Options opts)
 {
     return((RegexOptions)((int)opts ^ (int)RegexOptions.Singleline));   // simply toggle the Singleline option
 }
Example #5
0
 /// <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>());
 }