str.replace(/(\d{2})(\d{2})/, '$1.$2.')
// или
str.replace(/(?=\d{4}$|\d{6}$)/g, '.')
// или
str.match(/(..)(..)(.+)/).slice(1).join('.')
// или
[ 0, 2, 4 ].map((n, i, a) => str.slice(n, a[i + 1])).join`.`
// или
[...str].reduce((acc, n, i) => acc + n + ([ ,'.',,'.' ][i] || ''))
// или
''.concat(...Array.from(str, (n, i) => '24'.includes(i) ? `.${n}` : n))
Supports 1st, 2nd and 3rd Gen AMD® Ryzen™, Ryzen™ with
Radeon™ Vega Graphics, 2nd Gen AMD® Ryzen™ with Radeon™
Graphics, Athlon™ with Radeon™ Vega Graphics, A-series and
Athlon™ X4 Desktop