;; find the next escape sequence
(while (setq end (string-match ansi-color-regexp string start))
(setq result (concat result (substring string start end))
;; find the next escape sequence
(while (setq end (string-match ansi-color-regexp string start))
(setq result (concat result (substring string start end))