我想解析一个包含如下数据的文件:
05\/26\/2013 06:09:47 \-0700 - AUTHN_SUCCESS - GET - ddsbcggio_ac - 200.12.33.44 - abcweb.eegeserv.com\/abcweb\/abcwebInitialize.do?PORT=SPQ - uid=radash@abc.com\,ou=People\,o=zeb.com - 06:09:47 - http - uizweb_zam - - 2uid=bolched@abc.com
05\/26\/2013 06:09:48 \-0700 - AUTHN_SUCCESS - GET - ddsbcggio_ac - 200.12.33.44 - abcweb.eegeserv.com\/abcweb\/abcwebInitialize.do?PORT=SPQ - uid=rad-ash2s@abc.com\,ou=People\,o=zeb.com - 06:09:48 - http - uizweb_zam - - 2uid=bolchedssd@abc.com
05\/26\/2013 06:09:49 \-0700 - AUTHN_SUCCESS - GET - ddsbcggio_ac - 200.12.33.43 - abcweb.eegeserv.com\/abcweb\/abcwebInitialize.do?PORT=SPQ - uid=sjhsjdh@abc.com\,ou=People\,o=zeb.com - 06:09:49 - http - uizweb_zam - - 2uid=kjsdsdjhjsh@abc.com
并得到:
05/26/2013 06:09:49 and uid=radash@abc.com,ou=People,o=zeb.com
05/26/2013 06:09:48 and uid=rad-ash2s@abc.com,ou=People,o=zeb.com
我尝试了 split('-') 但它不起作用 split('-') 因为如您所见: 像上面第二行这样的一些行有: rad-ash2s@abc.com ( '-' ) 介于两者之间。有时,数据的其他部分也有“-”。
请帮忙。