ur_here">
当前位置: <a href=".">首页</a> <code>></code> <a href="category.php?id=56">价格</a> <code>></code> <a href="category.php?id=59">101元-200元</a> <code>></code> 18朵黄玫瑰/为你<用正则从以上字符中获取价格 101元-200元 18朵黄玫瑰/为你
当前位置: <a href=".">首页</a> <code>></code> <a href="category.php?id=56">价格</a> <code>></code> <a href="category.php?id=59">101元-200元</a> <code>></code> 18朵黄玫瑰/为你<用正则从以上字符中获取价格 101元-200元 18朵黄玫瑰/为你
tempStr = Regex.Replace(Regex.Match(tempStr, @"<a[^>]*href=(['""]?)[^.'""\s>]+[^>]*>[\s\S]*<(/a>)?").Value, @"<([^>]*>)?", "");
//价格 > 101元-200元 > 18朵黄玫瑰/为你
string tempStr = File.ReadAllText(@"C:\Documents and Settings\Administrator\桌面\Test.txt", Encoding.GetEncoding("GB2312")); tempStr = Regex.Replace(Regex.Match(tempStr, @"(?im)<a[^>]*href=(['""]?)[^.'""\s>]+[^>]*>[\s\S]*<(/a>)?").Value, @"<([^>]*>)?(>[;;]?)?", "");
//价格 101元-200元 18朵黄玫瑰/为你