I am trying to write this funtion to grab the text value and then strip the text from after the - symbol and the - symbol itself. eg
some text - is found
would become
some text
This is what iv got so far currently it just removes the -
$.keynav.enterDown = function () {
var accom = $('#suggestions p.keynavon').text().replace(/-/g,'');
alert(accom);
$('#search input#q').val(accom);
$("#form").submit();
}