如果是python 做这个事情 就很容易的
>>> lst=[x.split(",") for x in s.split("\n")]
>>> lst
[['$GPRMC', '014254.70', 'A', '2603.613111', 'N', '11910.693806', 'E', '0.364', '273.16', '230719', '', '', 'A*69'], ['$GPGGA', '014254.70', '2603.613111', 'N', '11910.693806', 'E', '1', '12', '1.13', '4.50', 'M', '9.90', 'M', '', '*64'], ['$GPRMC', '014254.80', 'A', '2603.613113', 'N', '11910.693794', 'E', '0.370', '272.77', '230719', '', '', 'A*63'], ['$GPGGA', '014254.80', '2603.613113', 'N', '11910.693794', 'E', '1', '12', '1.13', '4.50', 'M', '9.90', 'M', '', '*6D'], ['$GPRMC', '014254.90', 'A', '2603.613115', 'N', '11910.693792', 'E', '0.368', '271.60', '230719', '', '', 'A*6E'], ['$GPGGA', '014254.90', '2603.613115', 'N', '11910.693792', 'E', '1', '12', '1.13', '4.60', 'M', '9.90', 'M', '', '*6F'], ['$GPRMC', '014255.00', 'A', '2603.613123', 'N', '11910.693764', 'E', '0.365', '273.78', '230719', '', '', 'A*6C'], ['$GPGGA', '014255.00', '2603.613123', 'N', '11910.693764', 'E', '1', '12', '1.13', '4.60', 'M', '9.90', 'M', '', '*6B'], ['']]
>>> |