Change string index {0} to [0]