I have to compare two text file one is '|' delimated and the other one is 'tab' delimated. The tab delimated file has tabs of different lengths that make it hard for me to replace all the tabs with '|' in order to do a comparision.
Notice in the above example notice if there is a '|' between two items in file 'A' it is replaced with a tab and if there if a null value in File 'A' like '||' it is replace with a ""empty space surrounded by tab spaces
A tab-NULL-tab sequence most likely represents an empty field and could be replaced with a second StrTran() call turning it into a space.
A tab is a single character - 09h - if I recall correctly. For the tabs to be "different lengths" would imply that the actual tab character had been replaced with spaces. A StrTran can compress these also by converting all space-space entries into a single space.
I don't know if I understand the problem correctly.
If you mean that the tabs actually get replaced with spaces (0x20) when the file is saved. If not, then you have to go John's way.
If yes, then you have to find out what the tab (0x09) length is. If the tab length can vary from file to file you have a real problem, if it the same, a certain amount of spaces then has to be replaced with one '|'.
Convenience is the first step to enslave yourself. Freedom is inconvenient.