I am trying to check each line and based on first two digits, the comma needs to be place. I checked in the earlier post where the text is converted to csv with a tab delimited.
Here is the test file that needs to be changed to csv
11 051701
22 051701
330123405170105170112345
0100001123456789012987654321
0100002123456789012987654321
0100003123456789012987654321
0100004123456789012987654321
0100017123456789012987654321
.......
if the first 2 digits are 11, then a comma is placed after 2nd column and just before the 051701. If the first two digits are 01 then the commas should be place after 01, another comma after 00001, another after 123456789012. In short the output should look like this
11, ,051701
22, ,051701
33,01234,051701,051701,12345
01,00001,123456789012,987654321
01,00002,123456789012,987654321
01,00003,123456789012,987654321
01,00004,123456789012,987654321
01,00017,123456789012,987654321
.......
Any help is appreciated. Thanks
~