JSFiddle - React, Tailwind, and code Playground

by Alexey Ukolov

HTML

<div id="block"></div>

JavaScript

block = document.getElementById("block");

str = "matrix(1,0,0,1,0,0)";

from = str.lastIndexOf(',') - 1;
to = str.lastIndexOf(')');

newStr = str.slice(0, from) + "80" + str.slice(to)

block.innerHTML = newStr;