I have input string like this:
let inputTest = `<div style="left: 474px; top: 550px"></div>`;
And I'm trying to get x from left: x px
from above string.
I'm using regex like this one
console.log(inputTest.match(/\left:(.*)$/g));
// ["left: 474px; top: 550px"></div>"]
but it clearly start from word "left" but finish after entire string.
I want to start after 'left:' and finish before 'p' letter from px. So I will have only the number which will convert to its type (sometimes without space but will delete space after regex).