You have a series of lines, like this: <div id="go" style="position:absolute; left:468px; top:43px;width: 112px; height:110px;z-index:1; visibility:visible"><img src="images/ go.png" width="112" height="110" border="0"></div> All you want out of this line is: 468 43 112 110 images/go.png What is the cool way to write a function to extract these strings?