As far as I know, Ruby doesn't support Unicode properties (at least until version 1.8), so you might need to use
^(?:[^\W\d_]|-)+$
Explanation: [^\W\d_]
matches any letter (literally it means "Match a character that is neither a non-alphanumeric character, a digit, or an underscore"). In this case, a double negative is the right thing to use. Since we're using a negated character class, we then need to allow the -
by alternation.
Caveat: From regular-expressions.info it looks like Ruby only matches ASCII characters with the \w
shorthand, so this regex might not work as intended. I don't have Ruby installed here, but on rubular.com this regex is working correctly.
The alternate solution
^[[:alpha:]-]+$
should match non-ASCII characters according to regular-expressions.info and RegexBuddy, but on rubular.com it's not working.