仅供参考,您 可以 使用VB.NET Like-Operator:
string text = "x is not the same as X and yz not the same as YZ";bool contains = LikeOperator.LikeString(text,"*X*YZ*", Microsoft.VisualBasic.CompareMethod.Binary);
使用
CompareMethod.Text,如果你想忽略大小写。
您需要添加
using Microsoft.VisualBasic.CompilerServices;。



