getting mixed-up data into tab delimited columns

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Posts: 1
Joined: Wed Jan 18, 2006 9:15 am
Location: Australia

getting mixed-up data into tab delimited columns

Postby Robertheron » Wed Jan 18, 2006 11:01 am


I'm trying to get this to work - any suggestions would be appreciated...

I have used textpipe (pro version) to put a marker in front of certain types of data in a file of 17,000 lines. The marker I have inserted is the number of the column I want that piece of data to end up in. My markers are {001}, {002} ... up to {020}

So I now have a file that looks schematically like this:


What I want is to put everything starting:
{001} in tab column 1
{002} in tab column 2
{017} in tab column 17

So the example above would look like this (where > stands for a tab):

Note that only data is tagged - null fields are not tagged (e.g. lines 4 and 5 above are each missing one field - most lines in my files contain only a few fields - so I want all the null fields to contain just tabs).

Any suggestions?



User avatar
DataMystic Support
Site Admin
Posts: 2139
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Postby DataMystic Support » Fri Jan 20, 2006 10:00 am

Hi Robert,

Handle this with a 4 separate search replaces - for {004}, then {003}, then {002} and finally {001}, each moving the field to the start of the line.

e.g. find easy pattern:

Code: Select all

  [ capture( longest 0+ not cr or lf ), '{004}', capture( longest 0+ not '{' or cr or lf ) ]

Replace with:


and so on for 3 downto 1.

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest