Hello,
I want to allow only entered data from the English alphabet and from alphabet from Germany
like öäü
OR France like áê
or Chinese like ...
How can I configure my Regex so it accepts all alphabetical chars from internal alphabet?
Hello,
I want to allow only entered data from the English alphabet and from alphabet from Germany
like öäü
OR France like áê
or Chinese like ...
How can I configure my Regex so it accepts all alphabetical chars from internal alphabet?
With PCRE it would be \w
, a "word" character.It also accepts unicode when configured properly.
It varies. Some languages have a "Unicode" flag which extend \d
, \w
, etc. Some support equivalence classes in a range, e.g. [[=e=]]
matches e
, é
, ê
, etc. The regex documentation for your language or library will explain what options are available.
This may be a good place to start
Unicode:
http://www.regular-expressions.info/unicode.html
Regex language flavors:
http://www.regular-expressions.info/refflavors.html
Since you specifically ask for Unicode, \p{L}
is the shortcut for a Unicode letter. Not all regex flavors support this syntax, though. .NET, Perl, Java and the JGSoft regex engine will, Python won't, for example.
So, for example \b\p{L}+\b
will match an entire word of Unicode characters.
In a lot languages, you can simply enter the unicode symbols into the character class: [a-zäöüß]
etc.