It seems you only want to remove color codes that indicate a background color, and retain those that only color the text.

For that case, this worked in my limited testing:
Code:
alias nobkgd {
  $iif($isid,return,echo -a) $regsubex($1-,/\x03\d?\d\x2c\d?\d/g,$chr(32))
}

\xo3 is hex code 3, the only thing I tried that caught Ctrl+k.
Likewise, \x2c is hex code for comma. mirc doesn't like literal commas, even inside regex.

Last edited by LonDart; 02/10/07 11:53 AM.