日期:2014-05-17 浏览次数:20487 次
static void Main(string[] args)
{
Func<string, string[]> getvalues = (text) =>
{
string[] txts = text.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
List<string> list = new List<string>();
MatchCollection mc = Regex.Matches(txts[1], "[a-z][0-9]+");
string[] res = new string[mc.Count];
for (int i = 0; i < mc.Count; i++)
{
list.Add(mc[i].Groups[0].Value);
}
if (txts.Length > 2)
{
if (txts[2].Contains('&'))
{
txts[2] = txts[2].Contains('?') ? txts[2].Replace("?", "") : txts[2];
txts[2].Split('&').ToList().ForEach(x => list.Add(x));
}
else