日期:2014-05-17 浏览次数:20443 次
string tempStr = File.ReadAllText(@"C:\Documents and Settings\Administrator\桌面\Test.txt", Encoding.GetEncoding("GB2312"));//读取txt
Match match = Regex.Match(tempStr,@"(?i)<img[^>]*?height:\D+?(\d+)[^>]*?width:\D+(\d+)");
string height = match.Groups[1].Value;//225
string width = match.Groups[2].Value;//300