АН
Size: a a a
АН
АН
r🧬
АН
V
ВК
d
function orderedMatrix(a, b) {
const regex = new RegExp(`(\d+(\,|$)){${b}}`, "g");
const row = [...Array(a * b + 1).keys()].slice(1).join(",");
console.log(row.match(regex)); //-> null
console.log(row.match(/(\d+(\,|$)){5}/g)); //-> works
}
orderedMatrix(5, 5);
V
function orderedMatrix(a, b) {
const regex = new RegExp(`(\d+(\,|$)){${b}}`, "g");
const row = [...Array(a * b + 1).keys()].slice(1).join(",");
console.log(row.match(regex)); //-> null
console.log(row.match(/(\d+(\,|$)){5}/g)); //-> works
}
orderedMatrix(5, 5);
d
K
AE
K
a
a
DK
K
K
nn
nn
a