Fixes bug 1029536 - allow hyphens in RID

one small change:

I did some extra testing, and the result of `/ref=((\w|-)+)/.exec( "ref=foo-bar" )` is `[ "ref=foo", "foo", "f" ]`

It's being greedy and capturing the last character.. so if we modify it a bit:

`/ref=((?:\w|-)+)/.exec( "ref=foo-bar" )` we get `[ "ref=foo-bar", "foo-bar" ]`