Hello, does anyone know why my console is showing 2 copies of the regex that I’m matching? My regex is such that it finds numbers with or without a decimal occurring after a math operator at the end of the checked string.
Instead of my anticipated console-log of 30.5, I get 30.5, 30.5.
let myString = ".323+30.5";
let myRegex = /(\d*\.?\d+)$/;
let getMatch = myString.match(myRegex);
console.log(getMatch)