RosettaCodeData/Task/Strip-comments-from-a-string/Emacs-Lisp/strip-comments-from-a-string.el
2026-04-30 12:34:36 -04:00

5 lines
223 B
EmacsLisp

(string-trim (string-trim-right " apples, pears # and bananas" "[#;].+"))
(string-trim (string-trim-right " apples, pears ; and bananas" "[#;].+"))
(string-trim (string-trim-right " apples, pears and bananas " "[#;].+"))