日期:2014-05-18 浏览次数:21060 次
string test = "BelongTo(USERS, \"3c8779ff-185e-487e-8c39-65510c119827\", \"2d820eb3-ab6d-481a-b31c-7a4ff464834d\")";
Console.WriteLine(test.Split('"')[1]);
Console.ReadLine();
------解决方案--------------------
using System;
using System.Text.RegularExpressions;
class Test
{
static void Main()
{
string s = @"BelongTo(USERS, ""3c8779ff-185e-487e-8c39-65510c119827"", ""2d820eb3-ab6d-481a-b31c-7a4ff464834d"")";
string t = Regex.Match(s, @"\w+\(\w+,\s+\""([^""]+)\""").Groups[1].Value;
Console.WriteLine(t);
}
}