Pages

Monday, March 30, 2009

How to tab delimit spaced entries

Here is a quick and dirty way to make a table that is spaced for formatting in to a tab delimited file

Given: A table that has data that is separated by spaces and you have columns that have multi-word values that you want to keep delimited by spaces.

Action: In a app with suitable search / replace functionality, follow these steps
  1. Replace all ' ' (two space occurrences) with a tab character
  2. Replace all ' ' (two tab occurrences) with a tab character
  3. Repeat step 2 until the two tab term is no longer found.
I imagine you could do this in a regex... I will have to see if I can figure that one out.

No comments:

Post a Comment