#9674
CrashNBurn
Member

AH! Sorry :-)

Well given the following input:

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,n5

Step 2:

Search: ^(d+,[A-Za-z]+,[A-Za-z]+,d+,)n[A-Z]+,(d+),([a-z]+)n1n[A-Z]+,(d+),([a-z]+)n1n[A-Z]+,(d+),([a-z]+)n
Replace: 12 3,4 5,6 7n

Final Output:

34,George,Clooney,123456,356 mg,324 ml,635 kg