【发布时间】:2022-07-20 21:53:58
【问题描述】:
var element = "Connectorparent3cchild4d" element.match(/\d+/g)
之前编写的代码是从字符串中获取数值
但现在 var element = "Connectorparentabcchildcd"
有没有办法将值 abc 和 cd 存储在数组中
我需要将 Connectorparent 和 child 之后的值存储在 typescript 的数组中
【问题讨论】:
标签: typescript