in reply to Removing ANSI Color Codes
(Yup, I grabbed that from a mud)// common defines #define NORMAL "\e[0m" #define BOLD "\e[1m" #define UNDERSCORE "\e[4m" #define BLINK "\e[5m" #define INVERSE "\e[7m" // foreground colours #define ANSI_BLACK "\e[30m" #define ANSI_RED "\e[31m" #define ANSI_GREEN "\e[32m" #define ANSI_YELLOW "\e[33m" #define ANSI_BLUE "\e[34m" #define ANSI_PURPLE "\e[35m" #define ANSI_CYAN "\e[36m" #define ANSI_WHITE "\e[37m" // background colours #define ANSI_BACK_BLACK "\e[40m" #define ANSI_BACK_RED "\e[41m" #define ANSI_BACK_GREEN "\e[42m" #define ANSI_BACK_YELLOW "\e[43m" #define ANSI_BACK_BLUE "\e[44m" #define ANSI_BACK_PURPLE "\e[45m" #define ANSI_BACK_CYAN "\e[46m" #define ANSI_BACK_WHITE "\e[47m"
To see the colour codes, at least in unix/linux, just show the file with 'less'. That makes them show up as ESC[1mESC[31m here.$line =~ s/\e\[\d+m//g;
If that doesn't help, you'll need to show an example somehow.
C.
|
|---|