Method ValidatePattern
ValidatePattern(String, String, String)
Verifies that a string matches a Regular expression pattern.
Declaration
public static Match ValidatePattern(this string value, string pattern, string paramName)
Parameters
public static Match ValidatePattern(this string value, string pattern, string paramName)
System.String | value | String value to validate. |
System.String | pattern | Pattern to use for testing |
System.String | paramName | Name of the parameter for the exception message if |
Returns
System.Text.RegularExpressions.Match | System.Text.RegularExpressions.Match from a successful pattern match. |
ValidatePattern(String, Regex, String)
Verifies that a string matches a Regular expression pattern.
Declaration
public static Match ValidatePattern(this string value, Regex pattern, string paramName)
Parameters
public static Match ValidatePattern(this string value, Regex pattern, string paramName)
System.String | value | String value to validate. |
System.Text.RegularExpressions.Regex | pattern | Pattern to use for testing |
System.String | paramName | Name of the parameter for the exception message if |
Returns
System.Text.RegularExpressions.Match | System.Text.RegularExpressions.Match from a successful pattern match. |