I have a txt file with some data I want to clean and export as csv but the format is too messed up . The lines in the txt file are in this format
[email protected]:specialcode | Status - 2022-11-25
[email protected]:anothercode | Status - 2023-08-15
[email protected]:codeworcd | Status - 2036-06-19
and so one
I want to convert the lines to
[email protected] , specialcode , Status , 2022-11-25
[email protected], anothercode , Status , 2023-08-15
[email protected], codeworcd, Status, 2036-06-19
So that i can save the file as csv.
How can I approach such a complex situation? I can loop over the lines and split it with split(‘:’) but each character is different. So it appears more challenging.
Thanks