$('.priceSort-table__item td:nth-child(2)').each(function(){
var item = $(this),
parent = item.closest('tr'),
text = item.text(),
regex = /(\d+)(?:х|x)?/g,
match = text.match(regex),
arr = [];
while ((m = regex.exec(text)) !== null) {
arr.push(m[1]);
}
item.text(arr.join(" "));
arr.forEach(function(dig, idx){
switch(idx){
case 0:
parent.addClass('l' + dig);
break;
case 1:
parent.addClass('w' + dig);
break;
case 2:
parent.addClass('h' + dig);
break;
}
});
});
$('.priceSort-table__item td:nth-child(2)').each(function(){
var $me = $(this),
val = $me.html()
size = val.split('х');
$me.html(size.join(' '));
$me.addClass('l' + size[0]);
$me.addClass('w' + size[1]);
$me.addClass('h' + size[2]);
});