///
/// Uses regular expressions to determine if the string matches to a given regex pattern.
///
/// The input string.
/// The regular expression pattern.
/// The regular expression options.
///
/// true if the value is matching to the specified pattern; otherwise, false.
///
///
///
/// var s = "12345";
/// var isMatching = s.IsMatchingTo(@"^\d+$");
///
///
public static bool IsMatchingTo(this string value, string regexPattern, RegexOptions options)
{
return Regex.IsMatch(value, regexPattern, options);
}
|