#!/bin/bash
sed -E "s/"$'\E'"\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g"


syntax highlighted by Code2HTML, v. 0.9.1