var selectWithDescription = function(text){
var newText = text;
//array of find replaces
var findreps = [
{find:/^([^\-]+) \| /g, rep: ''},
{find:/([^\|><]+)$/g, rep: ''}
];
for(var i in findreps){
newText = newText.replace(findreps[i].find, findreps[i].rep);
}
return newText;
}
// vim:syntax=javascript