-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])' –