MaskedTextBox Regex mask for international characters

Editors for WPF Forum

Posted 10 years ago by Ryan Courreges
Version: 14.1.0601
Avatar

I'm using a MaskedTextBox to limit input to word characters and a few extra characters. The mask must allow all international letter or word characters. My mask is [\w/ \-]{0,129}, which works just fine using the standard .NET Regex class, but does not work with the regex parser the MaskedTextBox uses. Is there a way to force the control to use the .NET built in class or am I going to need to resort to a negative mask for all the possible characters I don't want to allow?

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ryan,

At this time, the internal regular expression character classes don't support Unicode categories, and you can't have it use the .NET regex engine.  So the \w will just resolve to normal ASCII word characters.  We will log the request to add support for Unicode categories, which would allow \w to cover all international word characters as well.  In the meantime, you would need to specify additional word character ranges in your character class.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.