Prova in questo modo:
codice:
var stile = 'border-top'
var re = /-([a-z])/
   // alert(stile.replace(re,"$1".toUpperCase()))  <-- cosė sembra non funzionare
alert(stile.replace(re,stile.match(re)[1].toUpperCase()))