Re: regex replace with match

2006-08-23 Thread Charles E Campbell Jr
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

RE: regex replace with match

2006-08-22 Thread Gene Kwiecinski
>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,

Re: regex replace with match

2006-08-22 Thread A.J.Mechelynck
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

Re: regex replace with match

2006-08-22 Thread Tim Chase
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

regex replace with match

2006-08-22 Thread striker
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