我在這裏做錯了什麼? .Net支持用於內聯修改區分大小寫的(?i :)結構...但我無法使此行生效。.Net正則表達式:內聯區分大小寫不起作用
Console.WriteLine(Regex.Match("ab(?i:z)", "abZ").Success); //Returns false,
//though it should return true??
我在這裏做錯了什麼? .Net支持用於內聯修改區分大小寫的(?i :)結構...但我無法使此行生效。.Net正則表達式:內聯區分大小寫不起作用
Console.WriteLine(Regex.Match("ab(?i:z)", "abZ").Success); //Returns false,
//though it should return true??
如何以正確的順序得到的參數?
Regex.Match("abZ", "ab(?i:z)").Success
public static Match Match(
string input,
string pattern
)
所以,Regex.Match("abZ", "ab(?i:z)")
會做你想要什麼。
DUUUUH!傻我 – Grynn