striker wrote:
I have a large fixed width database file that I would like to delimit
with commas. For example here are 2 lines of the file:
210044012123540759F181012004103C14 29847.3741091 4280 5070
42789 28529 2769 2449 3320
2948
>I have a large fixed width database file that I would like to delimit
>with commas. For example here are 2 lines of the file:
...
>***note*** Since this is a fixed width data base file, I can import
>it into a database as is. I am only doing this as a learning
>experience.
Just as a fwiw,
striker wrote:
I have a large fixed width database file that I would like to delimit
with commas. For example here are 2 lines of the file:
210044012123540759F181012004103C14 29847.3741091 4280 5070 42789
28529 2769 2449 3320
2948 0
I was going to use a simple regex replacement like::%s/\(.\{8}\)\
(.\{2}\)\(.\{3}\)/\1,\2,\3,/g This does work when only replacing
a small number of fields. I get 2 errors when I source a file with
the command for all 35 fields. The errors are:
E51: Too many \(
E476: Invalid comma
I have a large fixed width database file that I would like to delimit
with commas. For example here are 2 lines of the file:
210044012123540759F181012004103C14 29847.3741091 4280 5070
42789 28529 2769 2449 3320
2948 05121
21004401