测试平台:http ://regexhero.net/tester/
输入字符串:"_sql": "SELECT * FROM AA"
正则表达式:(?:"_sql"[\s]*)([^,]*)
期望的结果:“SELECT * FROM AA”
现在我进入 c# 并将其编码:
Match match = Regex.Match("_sql\": \"SELECT * FROM AA", @"(?:""_sql""[\s]*)([^,]*)");
if (match.Success)
{
String value = match.Groups[0].Value;
Console.WriteLine(value);
}
为什么是match.Success
假的?