Re: How to replace variable spaces with a tab - Please Help

2003-09-08 Thread antigone
>> What I want to do is replace any repeating spaces (two or more) with a >> tab. I know the examples below do not work but am just giving it as >> "pseudocode" of replacing repeating spaces (between 2 and 50) with a >> tab: >> >> s/[2..50]/\t/gi; >> >> or maybe hex value (hex 20 is the space cha

Re: How to replace variable spaces with a tab - Please Help

2003-09-06 Thread James Edward Gray II
On Saturday, September 6, 2003, at 07:59 AM, perlwannabe wrote: I have a text file that is a mess. It contains various fields with lots of spaces between the fields. The amount of spaces differs from field to field. Here is a sample of the file: <8sp>NAME:<13sp>JOHN SMITH<22sp>RANK:<3sp>CAP

How to replace variable spaces with a tab - Please Help

2003-09-06 Thread perlwannabe
I have a text file that is a mess. It contains various fields with lots of spaces between the fields. The amount of spaces differs from field to field. Here is a sample of the file: <8sp>NAME:<13sp>JOHN SMITH<22sp>RANK:<3sp>CAPTAIN<15sp>WIFE:<6sp>POCAHONTAS... What I would like to have after p