Hi, I have text file:
Name: xyz
Gender: M
Address: "120_B_C; ksilskdj; lsudlfw"
Zip: 20392
Name: KLM
Gender: F
Address: "65_D_F; wnmlsi;lsuod;,...."
Zip:90233
I want to insert 2 new lines before the 'Address: ' line deriving value from this Address line value
The Address value in quotes until the first semi-colon should form the StreetName, and until underscore(_) within this should form the StreetNo,
as shown below
Name: xyz
Gender: M
StreetNo: 120
StreetName: 120_B_C
Address: "120_B_C; ksilskdj; lsudlfw"
Zip: 20392
Name: KLM
Gender: F
StreetNo: 65
StreetName: 65_D_F
Address: "65_D_F; wnmlsi;lsuod;,...."
Zip:90233
Also it would be nice to have the additional check that the code only inserts where the 2 lines (StreetNo, StreetName) are not already available
Thanks,
-sri