I would like to parse a file containing data as below:
05\/26\/2013 06:09:47 \-0700 - AUTHN_SUCCESS - GET - ddsbcggio_ac - 200.12.33.44 - abcweb.eegeserv.com\/abcweb\/abcwebInitialize.do?PORT=SPQ - [email protected]\,ou=People\,o=zeb.com - 06:09:47 - http - uizweb_zam - - [email protected]
05\/26\/2013 06:09:48 \-0700 - AUTHN_SUCCESS - GET - ddsbcggio_ac - 200.12.33.44 - abcweb.eegeserv.com\/abcweb\/abcwebInitialize.do?PORT=SPQ - [email protected]\,ou=People\,o=zeb.com - 06:09:48 - http - uizweb_zam - - [email protected]
05\/26\/2013 06:09:49 \-0700 - AUTHN_SUCCESS - GET - ddsbcggio_ac - 200.12.33.43 - abcweb.eegeserv.com\/abcweb\/abcwebInitialize.do?PORT=SPQ - [email protected]\,ou=People\,o=zeb.com - 06:09:49 - http - uizweb_zam - - [email protected]
and get:
05/26/2013 06:09:49 and [email protected],ou=People,o=zeb.com
05/26/2013 06:09:48 and [email protected],ou=People,o=zeb.com
I tried split('-') but it does not work split('-') because as you can see : Some lines like the second one above has: [email protected] ( a '-' ) in between. Also some times, there are '-' in other part of data too.
Please help.
split / - /with spaces around the hyphen?,ouand,o, is that a typo?