我試圖把這個: "This is a test this is a test"
到這一點: ["This is a", "test this is", "a test"]
我嘗試這樣做: const re = /\b[\w']+(?:[^\w\n]+[\w']+){0,2}\b/
const wordList = sample.split(re)
console.log(wordLis
我有三個工作正則表達式模式幾個正則表達式模式(不是有些海峽,任何文字,日期): ^(sezon\s[0-9]+) => finds if string starts with sezon $$ where $is digit
([a-zA-z]*|\b)*.* => that should match any words
\d{1,2}[.]\d{1,2}[.]\d{2,4} => that