JSFiddle - React, Tailwind, and code Playground

by sperske

JavaScript

var text = "sid='206' x='34.8395' y='32.1178'>×2 (206) ",
    regex = /x=\'([0-9]+\.[0-9]+)\' y=\'([0-9]+\.[0-9]+)\'/i,
    match;

match = regex.exec(text);
if (match) {
    console.log(match[1], match[2]);
}