I have text line by line which contains many field name and their value seperated by : , if any line does not have any field value then that field would not exist in that line for example
First line:
A:30 B: 40 TS:1/1/1990 22:22:22
Second line
A:30 TS:1/1/1990 22:22:22
third line
A:30 B: 40
But it is confirmed that at max 3 fields are possible in single line and their name will be A,B,TS. while writing python script for this, i am facing below issues: 1) I have to extract from each line which are the field exist and what are their values 2) Field value of field TS also have seperator ' '(SPACE).so unable retrieve full value of TS(1/1/1990 22:22:22)
Output valueshould be extracted like that
First LIne:
A=30
B=40
TS=1/1/1990 22:22:22
Second Line:
A=30
TS=1/1/1990 22:22:22
Third Line
A=30
B=40
Please help me in solving this issue.