 <p>Here I'm only matching the numbers and period character. This code should return the numbers you're looking for. It uses your data string from your example.</p> <pre><code>&lt;? preg_match_all('!Gold\s+([0-9.]+)\s+([0-9.]+)!i',$data,$matches); //New York $ny_bid = $matches[1][0]; $ny_ask = $matches[2][0]; print("NY\nbid: $ny_bid\n"); print("ask: $ny_ask\n\n"); //Asia $asia_bid = $matches[1][1]; $asia_ask = $matches[2][1]; print("Asia\nbid: $asia_bid\n"); print("ask: $asia_ask\n"); ?&gt; </code></pre> <p><strong>Output</strong></p> <pre><code>NY bid: 1411.20 ask: 1412.20 Asia bid: 1406.80 ask: 1407.80 </code></pre>