110,499
社区成员
发帖
与我相关
我的任务
分享
using System.Text.RegularExpressions;
Regex reg=new Regex(@"(?<CardNo>\d+)\s+(?<Money>\d+\.\d{2})\s+(?<Date>\d{8})\s+(?<Mno>\d{8})\s+(?<Sno>\d{12})\s+(?<Rate>\d+\.\d+%");
string result=string.Empty;
foreach(Match m in reg.Matches(strText))
{
result+=m.Groups["CardNo"].Value+" "+m.Groups["Money"].Value+" "+m.Groups["Date"].Value+" "+m.Groups["Mno"].Value+" "+m.Groups["Sno"].Value+" "+m.Groups["Rate"].Value+"\r\n";
}
string[] strs=System.Text.RegularExpressions.Regex.Split(strText,@"\s+");
string[] strs = strText.split(' ');