How can I convert the string 'a = [1 2 3;4 5 6;6 7 8]' to other string 'a = [[1,2,3],[4,5,6],[7,8,9]]' ? Numeric values can have various forms such as 3.2, -4, 3e+3, 3e-2, 3E+10, 3E-2 and so on. Space can be inserted in the list.