Answers:
看看下面的例子:
Sub Test()
q = "[[[3.0, [5.0, 6.0]], [6.0, 6.0], [3.0, [6.0, 5.0]]]"
Do
w = Len(q)
q = Replace(q, "[[", "[")
q = Replace(q, "]]", "]")
Loop Until w = Len(q)
q = Replace(q, "], [", "|")
q = Replace(q, ", [", "|")
q = Replace(q, "],", "|")
q = Mid(q, 2, Len(q) - 2)
a = Split(q, "|")
End Sub
结果数组:
[
和]
同""
。然后拆分,
。迭代拆分字符串,将每个部分添加到数组中。