const text = "The float number is 8932.506 F";
const floatRegex = /[-+]?\d*\.\d+|\d+/;
const match = text.match(floatRegex);
if (match) {
const number = parseFloat(match[0]);
console.log("Extracted float:", number);
}
/*
run:
Extracted float: 8932.506
*/