Pretty basic stuff here, trying to pull the number 14.5 out of this string using regex and php but I can't seem to get syntax correct. Also, the number is dynamic and may not always be a decimal but the goal here is to try and pull a number between the word Weight:
and </li>
:
<ul>
<li>Manufacturer: something</li>
<li>Model: 1216D101</li>
<li>Condition: New</li>
<li>Dimensions: 12" x 16"</li>
<li>Sold by the Dozen</li>
<li>Weight: 14.5 Lbs.</li>
</ul>
This is what I have so far and have tried variations but keep falling short:
if (preg_match("/\Weight:\(\d+)\.(\d*?)\<\/li>/", $desc, $WEIGHT) == true)
{ echo $WEIGHT[0]; }