EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     cross tabulation
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
CrashNBurn
Posted on: 9/23/2011 10:18 am
Just can't stay away
Joined: 4/8/2010
From:
Posts: 130
Re: cross tabulation
AH! Sorry

Well given the following input:
Quote:
34,George,Clooney,123456,LDL,356,mg
34,George,Clooney,123456,HDL,324,ml
34,George,Clooney,123456,VLDL,635,kg


If your file is tab delimited instead of commas, then you will need to replace all commas below with "\t"

Step 1:
Search: ^(\d+),([A-Za-z]+),([A-Za-z]+),(\d+),(.*)
Replace: \1,\2,\3,\4,\n\5

Step 2:
Search: ^(\d+,[A-Za-z]+,[A-Za-z]+,\d+,)\n[A-Z]+,(\d+),([a-z]+)\n\1\n[A-Z]+,(\d+),([a-z]+)\n\1\n[A-Z]+,(\d+),([a-z]+)\n
Replace: \1\2 \3,\4 \5,\6 \7\n


Final Output:
34,George,Clooney,123456,356 mg,324 ml,635 kg



Flat Previous Topic | Next Topic


Subject Poster Date
   cross tabulation user 9/23/2011 8:14 am
     Re: cross tabulation CrashNBurn 9/23/2011 8:45 am
       Re: cross tabulation user 9/23/2011 9:03 am
       » Re: cross tabulation CrashNBurn 9/23/2011 10:18 am
           Re: cross tabulation user 9/23/2011 12:14 pm
             Re: cross tabulation CrashNBurn 9/23/2011 12:25 pm
               Re: cross tabulation user 9/23/2011 1:09 pm
                 Re: cross tabulation CrashNBurn 9/23/2011 2:07 pm
                   Re: cross tabulation user 9/24/2011 2:15 am
                     Re: cross tabulation CrashNBurn 9/24/2011 8:19 am

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文