@tennoseremel or this one :blobcatthink:
(defun zap-up-to-last-char (char)
"Zap up to the last occurrence of CHAR in the line"
(interactive "cZap up to char: ")
(let ((start (point)))
(let ((end (save-excursion
(move-end-of-line 1)
(search-backward (char-to-string char) start t))))
(if end
(delete-region start end)
(error "Character not found")))))
@rayslava Thanks! I'll try it later, when I have enough mental power to read what it does :blobcatgiggle: