in reply to Regex question : How to match \w and just the dash

I'd probably use
tr/-a-zA-Z0-9//cd;
You could also do
s/[^-a-z0-9]//ig;
If you wanted a regexp solution. However
s/[^-\w]//g;
(which is what I think you think you're looking for) will not do what you want, because \w includes _.