jay-S,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
$("[data-val]").each(function(indx, element){
var val = $(this).data("val");
var text = $(this).text().replace(/\d.*\d/,function(price) {
price = +price.replace(',','.').replace(/\s/g,'')||0;
price = (val * price).toFixed(2)
.replace('.',',')
.replace(/\d(?=(?:\d{3})+(?:\D|$))/g,'$& ')
return price
});
$(this).text(text)
});
});
</script>
</head>
<body>
<span data-val="4">$7,84</span>
<span data-val="4">1 849,45 руб.</span>
</body>
</html>