var arr = ['a14', 'a167', 'a25', 'a34', 'a210'];
arr.sort(
function (a, b) {
if (typeof a === 'string' && typeof b === 'string') {
return parseInt(a.replace(/\D/, '')) - parseInt(b.replace(/\D/, ''));
} else {
return a > b ? 1 : -1;
}
}
);
alert(arr.join(','));