Validate the source string with the specific mask.
true if the Source string are valid; otherwise, false.
The static PatternMatch method allow you to validate your string with the specific mask.
The PatternMatch mask expression allows you to use two basic character types: literal (normal) text characters and metacharacters.
Metacharacters used to ? and * characters.
| ? | Match any simbol |
| * | Zero or more matches |
The following code illustrates the use of the PatternMatch method.
bool bRet1 = McHttpModule.PatternMatch("text","*"); // return true
bool bRet1 = McHttpModule.PatternMatch("text","*e?t"); // return true
bool bRet1 = McHttpModule.PatternMatch("text","*exx"); // return false
bool bRet1 = McHttpModule.PatternMatch("text","t?et"); // return true
bool bRet1 = McHttpModule.PatternMatch("text","??e?"); // return false
bool bRet1 = McHttpModule.PatternMatch("text","t*t*"); // return true
McHttpModule Class | Mediachase.FileUploader Namespace