我有一个日志文件,内容如下:
2012-07-16 03:20:41,23796160897,Text,id:SAR-23796160897-c0-2-1 sub:000 dlvrd:001 提交日期:120715220216 完成日期:120716032038 stat:DELIVRD err:000 text:,FOTSO TOKAM,SMSCReceiptMsgId=SAR-23796160897-c0-2-1 2012-07-16 03:20:48,23796160897,Text,id:SAR-23796160897-c0-2-2 sub:000 dlvrd:001 提交日期:120715220216 完成日期:120716032045 stat:DELIVRD err:000 text:,FOTSO TOKAM,SMSCReceiptMsgId=SAR-23796160897-c0-2-2 2012-05-04 00:07:46,23777603300,Text,id:4FA23EB0 sub:000 dlvrd:001 提交日期:120503225018 完成日期:120504000744 stat:DELIVRD err:000 文本:,FLP,SMSCReceiptMsgId=4FA23EB0 2012-05-04 01:50:18,23796726987,Text,id:4FA23E95 sub:000 dlvrd:001 提交日期:120503225014 完成日期:120504015016 stat:DELIVRD err:000 text:,FLP,SMSCReeptMsgId=4FA23E95 2012-05-04 01:50:22,23799757015,Text,id:4FA23EB2 sub:000 dlvrd:001 提交日期:120503225018 完成日期:120504015021 stat:DELIVRD err:000 text:,FLP,SMSCReeptMsgId=4FA23EB2 2012-05-04 01:50:48,23799907239,Text,id:4FA23F38 sub:000 dlvrd:001 提交日期:120503225042 完成日期:120504015046 stat:DELIVRD err:000 文本:,FLP,SMSCReeptMsgId=4FA23F38 2012-05-04 01:50:48,23799896455,Text,id:4FA23D1C sub:000 dlvrd:001 提交日期:120503175232 完成日期:120504015046 stat:DELIVRD err:000 text:,FLP,SMSCReeptMsgId=4FA23D1C 2012-05-04 01:50:48,23799896455,Text,id:4FA23F04 sub:000 dlvrd:001 提交日期:120503225031 完成日期:120504015046 stat:DELIVRD err:000 text:,FLP,SMSCReeptMsgId=4FA23F04 2012-05-04 01:50:50,23794105044,Text,id:4FA23F55 sub:000 dlvrd:001 提交日期:120503225046 完成日期:120504015048 stat:DELIVRD err:000 text:,FLP,SMSCReeptMsgId=4FA23F55 2012-05-04 01:51:19,23796029764,Text,id:4FA23FEE sub:000 dlvrd:001 提交日期:120503225114 完成日期:120504015117 stat:DELIVRD err:000 text:,FLP,SMSCreceiptMsgId=4FA23FEE 2012-05-04 02:17:51,23775461594,Text,id:4FA24025 sub:000 dlvrd:001 提交日期:120503225125 完成日期:120504021749 stat:DELIVRD err:000 text:,FLP,SMSCReceiptMsgId=4FA24025 2012-05-04 04:08:02,23777437781,Text,id:4FA23F23 sub:000 dlvrd:001 提交日期:120503225037 完成日期:120504040800 stat:DELIVRD err:000 text:,FLP,SMSCReeptMsgId=4FA23F23 2012-05-04 04:50:12,23777970013,Text,id:4FA23E70 sub:000 dlvrd:000 提交日期:120503225005 完成日期:120504045011 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23E70 2012-05-04 04:50:15,23775182832,Text,id:4FA23E7E sub:000 dlvrd:000 提交日期:120503225008 完成日期:120504045014 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23E7E 2012-05-04 04:50:17,23777789644,Text,id:4FA23E80 sub:000 dlvrd:000 提交日期:120503225010 完成日期:120504045016 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23E80 2012-05-04 04:50:21,23777529371,Text,id:4FA23E8F sub:000 dlvrd:000 提交日期:120503225013 完成日期:120504045019 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23E8F 2012-05-04 04:50:21,23777613852,Text,id:4FA23E97 sub:000 dlvrd:000 提交日期:120503225014 完成日期:120504045020 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23E97 2012-05-04 04:50:24,23777407598,Text,id:4FA23EAE sub:000 dlvrd:000 提交日期:120503225017 完成日期:120504045023 stat:EXPIRED err:032 text:,FLP,SMSCReceiptMsgId=4FA23EAAE 2012-05-04 04:50:26,23777736950,Text,id:4FA23EAF sub:000 dlvrd:000 提交日期:120503225018 完成日期:120504045024 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23EAF 2012-05-04 04:50:31,23775834128,Text,id:4FA23ED6 sub:000 dlvrd:000 提交日期:120503225024 完成日期:120504045030 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23ED6 2012-05-04 04:50:36,23777486441,Text,id:4FA23EF3 sub:000 dlvrd:000 提交日期:120503225029 完成日期:120504045035 stat:EXPIRED err:027 text:,FLP,SMSCreceiptMsgId=4FA23EF3
现在,我想通过使用带有 c#.net 和 LINQ 的正则表达式从该内容中捕获几个特定字段的值,例如“id、done date、stat”。
如果有人有任何想法,请帮助我。