日期:2014-05-18 浏览次数:20878 次
<P> <Run Text="qweqwe"/> <Run /> </P>
<P> <Run Text="qweqwe"/><Run /> </P>
string tempStr = File.ReadAllText(@"C:\Documents and Settings\Administrator\桌面\Test.txt", Encoding.GetEncoding("GB2312"));//读取tx string pattern = @"(?i)(?<=<Run[^>]*>)\s+"; string result = Regex.Replace(tempStr, pattern,string.Empty);