Fix problem with incomplete end sequences

Some terminals seem to not issue the complete end sequence '[0m' for returning to default color, but using a shorthand '[m', which can be fixed with a little tweak of the regular expression.