How can I get the first and next to digits of a number as an array using regex in JavaScript?
I was doing this :
let foo = '1234567';
let op = foo.match(/^\d{1}|\d{2}/g)
console.log(op)
But this outputs everything even after the third number.
Im trying to get the output as
[1,23]