I\'m trying to use PHP to get the Steam Community Market price of an item. I take a url (for example : http://steamcommunity.com/market/listings/730/StatTrak%E2%84%A2%20P250
Don't use regex for this task (see RegEx match open tags except XHTML self-contained tags, but there's a more explanatory link somewhere on SO)
You want to use XPath to select your elements based on fine criteria. From PHP.net this should get you the nodes you want:
$doc = new DOMDocument();
$doc->loadHTMLFile($file);
$xpath = new DOMXpath($doc);
$elements = $xpath->query('//span[@class="market_listing_price market_listing_price_with_fee"]');
the XPath //span[@class="..."]
means select all span
tags within the document the have the expected class attribute.