using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.Text.RegularExpressions;

public InputField SearchInputField;


var isMatchSuccess = Regex.IsMatch(TKDeviceGroupManegerRef.SearchDeviceStringList[i],SearchInputField.text);
                if (isMatchSuccess)
                {
                    Debug.LogError("匹配~"+ SearchInputField.text);
                }
例:

 string str1 = "刘备关羽张飞孙权何问起";
string strInput = "关羽";
if (Regex.IsMatch(source, strInput )) 
{
   Debug.LogError("匹配~"+ strInput );//包括模糊搜索匹配

 

相关文章:

  • 2021-09-20
  • 2021-05-21
  • 2021-12-10
  • 2022-12-23
  • 2021-10-12
  • 2021-06-15
  • 2022-03-01
  • 2022-12-23
猜你喜欢
  • 2022-01-08
  • 2022-02-08
  • 2022-12-23
  • 2021-05-25
  • 2021-12-13
  • 2021-06-25
  • 2022-01-09
相关资源
相似解决方案