-1
我试图从*开始并使用匹配函数结束于*的字符串。我得到的字符串数组不是一个字符串。 我的代码是如何在javascript中使用匹配函数获取字符串
Str="==Quotes==* We thought that he was going to be -- I shouldn't say this at Christmastime -- but the next messiah.** On [[Barack Obama]]"
regE=/\* \w*/gi
newArr=str.match(regE)
console.log(newArr)
匹配给你所有的比赛,能有什么办法? – Li357
'regE = /\*(.*?)\*/; newArr = str.match(REGE);的console.log(newArr [1])' –