Lets say I have a string: "This is a string of words that I want to pair"
I ideally want this as the result:
["This is", "is a", "a string"....]
I have this regex:
let str = "This is a string of words that I want to pair"
let regexp = /\b[0-9A-Za-z]+\s+\b[0-9A-Za-z]+/g
let array = [...str.matchAll(regexp)]
But it is returning:
["This is", "a string", "of words"...]
How do I correct this?