I have tried to use the LikeOperator.LikeString functionality for pattern matching as shown below:
// Usage: bool matchValue = LikeOperator.LikeString(string, pattern, CompareMethod);
bool match = LikeOperator.LikeString("*test*/fe_quet", "(*)test(*)/*", Microsoft.VisualBasic.CompareMethod.Text);
The above should return true as per the documentation, but it simply returns false. I tried to escape the (*) with the brackets, but it does not seem to work in that way. Could anyone please help me to define the pattern string with the special characters?
Thanks
Aucun commentaire:
Enregistrer un commentaire