Пример #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());
 }
Пример #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>();
 }
Пример #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()));
 }
Пример #4
0
 private static RegexOptions toStandardOpts(this Regex2Options opts)
 {
     return((RegexOptions)((int)opts ^ (int)RegexOptions.Singleline));   // simply toggle the Singleline option
 }
Пример #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>());
 }