by Mofi » Sat Apr 22, 2006 2:38 pm
Use this UltraEdit style regular expression. The help of UE about the Find command and regular expression should help you to understand it.
Find: %^([~,^r^n]+^),
Replace: ^1^t
% means start search at every begin of a line.
^(...^) a string found with the expression inside the brackets can be used again in the replace with ^1 (and ^2, ^3, ... up to 9 expressions are possible).
[~,^r^n] means NOT a ',' or line termination character (carriage return or linefeed).
+ means preceding expression or character one or more times.
So the whole search expression means:
Find a string at begin of a line which has at least 1 character and does not contain a comma or a line termination character. This string is marked for usage in the replace string too. After this string a comma must follow. The whole found string is replaced with the marked part - so the string from begin of the line to first comma does not change - and a tab character which replaces the comma.