We\'d like to convert a CSS style entered as string into a JS object.
E.g.,
var input = \" border:solid 1px; color:red \";
expec
A very simple one:
var regex = /([\w-]*)\s*:\s*([^;]*)/g; var match, properties={}; while(match=regex.exec(cssText)) properties[match[1]] = match[2].trim();
https://regex101.com/r/nZ4eX5/1