tags:

views:

74

answers:

2

Hi.

In .NET, \p{L} matches any ascii or non-ascii letter (so it will match both a and ü).

http://www.regular-expressions.info/unicode.html#prop

Is there a Vim equivalent for this?

In Vim \a or \w will only match characters in range [a-z] (or [0-9A-Za-z_]).

A: 

For Unicode take a look at http://stackoverflow.com/questions/3016965/regex-unicode-charater-in-vim

that should give you the ranges you're looking for.

Keng
'\X' is the inverse of '\x' which looks for hex characters.
Brian Clements
@Brian Clements is unicode
Keng
@Keng not in vim it isn't
Brian Clements
oops, my bad. .
Keng
+1  A: 

You can explicitly tell vim which ranges of hex values to match. This is kind of a shotgun approach, but if you know what the possible ranges (like UTF-8 for example) this would work:

/[\x7f-\xffa-zA-Z]

You can also search for explicit unicode values by entering in the unicode character directly or it's code in the following format:

/\%u0300
Brian Clements