Added regex to deal with new chart format. Also added optional debug function to help test new charts