Правильно ли я интерпретирую ваш вопрос, если вы, учитывая следующее:
<div>
<span>12.92$</span>
<span>24.82$</span>
</div>
хотите вернуть 12,92 $? То есть Вы хотите первое вхождение суммы денег с веб-сайта?
Если это так, попробуйте следующее:
// Will find any number on the form xyz.abc.
// Will NOT cope with formatting such as 12 523.25 or 12,523.25
$regex = '/(\d+(:?.\d+)?) *([$])/'
preg_match($regex, $website, $matches);
//matches[0] => 123.45$
//matches[1] => 123.45
//matches[2] => $
Еще одна, более амбициозная попытка (которая может случиться чаще):
// Will find any number on the form xyz.abc.
// Attempts to cope with formatting such as 12 523.25 or 12,523.25
$regex = '/(\d{1,3}(:?[, ]?\d{3})*(:?.\d+)?) *([$])/'
preg_match($regex, $website, $matches);
//matches[0] => 12 233.45$
//matches[1] => 12 233.45
//matches[2] => $