Added 'C' flag for patterns which allows it to ignore color codes in the text