aqui la tienes
var regex = /^[\w-]+$/;
esa expresión retorna
true para cuando solo hay valores alphanumericos o guiones, aqui algunos testcases
Código:
var regex = /^[\w-]+$/;
console.debug(regex.test('stock'));
console.debug(regex.test('stock-sk8'));
console.debug(regex.test('stock182'));
console.debug(regex.test('stock_182'));
console.debug(regex.test('stock-7'));
console.debug(regex.test('&/stock_182'));
console.debug(regex.test('st?ock_%182'));
console.debug(regex.test('stock*-7'));
saludos