To match a word one can use\v(\w+)From the vim help :h \w:\w word character: [0-9A-Za-z_]This works exactly as described in the manual. However, I want tomatch words that contain characters beyond a-z, e.g.prstgrden. Matching the regular expression \v(\w+) againstprstgrden yields to three matches, instead:prstgrden^^ ^^^ ^^^^How to match words containing characters beyond a-z? My locale is set to English and if possible I'd like to keep it that way.Edit: The words might not belong to a single locale, e.g.prstgrdentre
Match word containing characters beyond a-zA-Z
vim;regular expression
Vim (as of version 7.3) is very limited with respect to support of non-ASCII characters in patterns. In particular, \w only matches ASCII letters, which is of limited usefulness.There are a few character class patterns that do support Unicode. Of interest to you are \I, which by and large matches letters and only letters, plus _ and @. At least on Debian squeeze (in a UTF-8 locale), there are errors; for example  and  are matched as letters, but all Latin accented letters seem to be recognied correctly. \I can be configured through the isident option, at least for the ASCII part.If you want serious Unicode support, you'll need to rely on an external tool. For example perl -C -e '/\p{L}/' to match UTF-8 letters (assuming an UTF-8 locale).