<span class='price'>238 000 </span>руб</span>
$(document).ready(function() { $('span.price').each(function() { var text=this.text(); alert(text); }); });
var text=$(this).text(); var re = new RegExp(/\s/g); text = text.replace(re, '');