zoukankan      html  css  js  c++  java
  • C# 应用正则表达式

    1.检测该字符串是否 带有字符“8”(类似sql语句:select * from tableName where name like '%8%')

    string pattern = @"w*8w*";
    string inputString = "第8幢";
    string result = Regex.IsMatch(inputString, pattern).ToString();
    Console.WriteLine(result);
    Console.ReadLine();
  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/ccjcjc/p/5378598.html
Copyright © 2011-2022 走看看