Hi jlaanep,
I would not use vi for this problem, but nawk which is a variant of awk since it contains substring functions that can simplify what you are trying to do - i.e. each line you are interested in must contain a '(', followed by some characters and a ',' followed by zero or more characters and a space - at which time you delete from the position of the space to the end of the line.
Try to search for an awk, gawk or nawk tutorial on the Internet, and learn how to invoke an awk program in a file, as your processing requirements are more than just simple enough to use vi and regular expressions.
-- Tom
P.S. Reference: The AWK Programming Language by Aho, Kernighan, and Weinberger, Addison-Wesley Series in Computer Science
__________________ The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein |