Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Basically the first two columns, the text and three sig-fig number are fixed, but the following columns sometimes have a *preceding them, and sometimes don't.{some random text} 9.99 9.999 9.999 9.999 9.9999 9.9999 {more text} 9.99 *9.999 *9.999 9.999 9.9999 9.9999 {even more text} 9.99 9.999 9.999 *9.999 *9.9999 *9.9999 ..this goes on for 12 or so columns..
Which did - <bold> absolutely nothing </bold>. The tabs are all still there.perl -1 "while (<>) s/\t(\*w+)/ \1/g;s/\t\s(w+)/ \1/g;print}" +myfile
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Conditionally converting tabs to spaces
by lhoward (Vicar) on Jul 03, 2000 at 22:07 UTC | |
|
Re: Conditionally converting tabs to spaces
by cwest (Friar) on Jul 03, 2000 at 21:43 UTC | |
by chromatic (Archbishop) on Jul 04, 2000 at 03:19 UTC | |
|
Re: Conditionally converting tabs to spaces
by nardo (Friar) on Jul 03, 2000 at 22:29 UTC |