您的位置:首页 > 其它

访客统计

2016-02-03 15:17 302 查看
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
StreamReader sr = new StreamReader(@"uv.txt", Encoding.Default);
String line;
List<String> lss = new List<String>();
while ((line = sr.ReadLine()) != null)
{
string cl = new Regex(@"(?<=\s)\d+").Match(line).ToString();
if (!lss.Contains(cl))
{
lss.Add(cl);
}
}
Console.WriteLine(lss.Count);
Console.Read();
}
}
}

uv文件:http://files.cnblogs.com/files/tqlin/uv.zip
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: