本帖最后由 zghwelcome 于 2017-3-23 10:06 编辑
比如源数据如下:海尔,101,10003,66,2016/12/11
海尔,101,10003,80,2016/11/03
海尔,101,10003,85,2016/10/25
东芝,525,89123,68,2016/10/23
东芝,525,89123,77,2014/10/13
东芝,525,89123,67,2014/9/20
东芝,525,89123,89,2014/5/5
东芝,525,89123,87,2014/4/25
联想,8981,653421,999,2016/8/25
联想,8981,653421,965,2015/6/19
我想得到如下的匹配结果:
[1]海尔,101,10003,66,2016/12/11
海尔,101,10003,80,2016/11/03
海尔,101,10003,85,2016/10/25
[2]东芝,525,89123,68,2016/10/23
东芝,525,89123,77,2014/10/13
东芝,525,89123,67,2014/9/20
东芝,525,89123,89,2014/5/5
东芝,525,89123,87,2014/4/25
[3]联想,8981,653421,999,2016/8/25
联想,8981,653421,965,2015/6/19
这些是CSV表格文件中的数据,我想取前3列相同的到一个匹配组里面,请问这个正则该如何写呢,谢谢! |