miusov,
<!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() { var min,max;
$('.price').text(function(i,t) {
t = +t.replace(/\D/g,'');
(!min|| t < min)&&(min=t);
(!max|| t > max)&&(max=t);
})
alert([min,max])
});
</script>
</head>
<body>
<div class="price">2000 грн</div>
<div class="price">1000 грн</div>
<div class="price">3000 грн</div>
<div class="price">5000 грн</div>
</body>
</html>