w is 'word characters' - it includes digits and the underscore. Your regex only needs to be [-w]+