使用Regex C#查找字符串中零个或一次出现的任何字符

时间:2019-11-25 15:48:10

标签: c# regex

假设我们有字符串“ Ver2.1 BSI; Ver2.1 BSIHUD” ,并希望检查 BSI HUD 。 我尝试过:

if (Regex.IsMatch(input_string, Regex.Escape("BSI.?HUD"), RegexOptions.IgnoreCase)) {/*remove expression from input string*/}

并希望收到 BSIHUD,BSI HUD,BSI-HUD true

0 个答案:

没有答案