>> >> So you want to drop the parenthesised string at the end of the line? Then I suggest the following: s/\([^(]*\)$// A left-paren. \( followed by anything but left-paren. [^(] repeated. * followed by a right-paren. \) at the end of the line. $