I am trying to parse a text file with ANSI color sequences in it, for example.
\e[0;37m
How to create a regex in Ruby?
Turns out this works perfectly fine:
def strip_ansi_sequence (str) str.gsub(/\e\[[^m]*m/, '') end