我需要查找文本小写或大写(使用正则表达式)我的代码:
static void Main(string[] args)
{
String s = "String : hello Hello HELLO hEllo ";
String patern = @"(hello)";
Regex myRegex = new Regex(patern);
foreach (Match regex in myRegex.Matches(s)) {
Console.WriteLine(regex.Value.ToString());
}
}
结果:
hello
我需要结果
hello
Hello
HELLO
hEllo
你能帮助我吗?