C#在字符串中查询指定字符串是否存在 LcVong 2021-11-01 159 阅读1分钟 Regex r = new Regex("abc"); // 定义一个Regex对象实例 Match m = r.Match("123abc456"); // 在字符串中匹配 if (m.Success)