I need to create a Pattern
that will match all Unicode digits and alphabetic characters. So far I have "\\p{IsAlphabetic}|[0-9]"
.
The first part is working well for me, it's doing a good job of identifying non-Latin characters as alphabetic characters. The problem is the second half. Obviously it will only work for Arabic Numerals. The character classes \\d
and \p{Digit}
are also just [0-9]
. The javadoc for Pattern
does not seem to mention a character class for Unicode digits. Does anyone have a good solution for this problem?
For my purposes, I would accept a way to match the set of all characters for which Character.isDigit
returns true
.