Let's say I have the ff regex:
var str = 'hi there I am';
function testing(input, int){
var par = input.match(`/.{1, ${int}}/g`);
console.log(par);
}
console.log(testing(str, 5));
How can I passed in the argument/variable n
to make it work on the regex?
Is there a way to do that?