ansi-color-filter-region

ansi-color-filter-region is a compiled Lisp function in `ansi-color.el'.

(ansi-color-filter-region BEGIN END)

Filter out all ANSI control sequences from region BEGIN to END.

Every call to this function will set and use the buffer-local variable
`ansi-color-context-region' to save position. This information will be
used for the next call to `ansi-color-apply-on-region'. Specifically,
it will override BEGIN, the start of the region. Set
`ansi-color-context-region' to nil if you don't want this.