日期:2014-05-17 浏览次数:20908 次
string input = @"A55A0024850100000CE2801105200043049C830079000000000000000000000000DB0D0AA55A0024850100000CE2801105200043018B7A002E000000000000000000000000670D0AA55A0024850100000CE2801105200043018B7A002E000000000000000000000000670D0A";
string pattern = @"(?i)A55A002485[\s\S]*?0D0A";
List<string> result = Regex.Matches(input, pattern).OfType<Match>().Select(a=>a.Value).Distinct().ToList();
/*
[0] "A55A0024850100000CE2801105200043049C830079000000000000000000000000DB0D0A" string
[1] "A55A0024850100000CE2801105200043018B7A002E000000000000000000000000670D0A" string
*/