I suck at regexes so need some help with this, if I pass the below string into someFunction(str)
<table width="100%" border="0" cellspacing="2" cellpadding="2" bgcolor="red">
how can I get back an array like so:
arr[table] = "";
arr[width] = "100%";
arr[border] = "border";
arr[cellspacing] = "cellspacing";
arr[bgcolor] = "cellpadding";
or in other words, the first part of the array the tag name and the other parts its properties.
Thanks!
/<\s*(\w+?)/(res[1] will contain the tag name)