【发布时间】:2021-09-14 02:55:03
【问题描述】:
你好,如果我有一个类似的字符串
"[[{abc}, {abc}, {abc}]]....blah".
我怎样才能做到这一点
"[{abc}, {abc}, {abc}]"
我想从第一个“[”开始,并以最后一个“]”结尾
var newString = oldstring.substring(1) //this starts at the second "[" but how to continue till the last "]"?
【问题讨论】:
标签: javascript substring