I use the following to check if a given string unicodeName
is within a certain character range:
unicodeName.matches(".*[^\u1000-\u103f].*")
However, this does not allow for the inclusion of space characters in the name. If I want the user to type space in the name and at the same time want the matcher to return true what would the regex be?
Example:
This works fine for me
but this doesn't
.*
allows any amount of spaces. Please clarify what you need. – Wiktor Stribiżew[ \u1000-\u103f]*
. Maybe you could trim the string after, and if need check its length to ensure input wasn't just whitespace or empty. – dave