use Term::ANSIColor ':constants'; # Note that there is not normally an 'x' betweeh the . I # added that so that Perlmonks.org wouldn't parse the post incorrectly. $_ = "normal green normal + normal"; $delimit{"code"} = GREEN; $delimit{"--"} = YELLOW; $delimit{"]"} = RED; $RESET = RESET; s{ (?:(.+?)) | (?:(?<=\x1b)\[(.+?)(\])) | (?:(