I am trying to match only Arabic text using a regular expression, but I am getting an exception. Here is my code:
txt.matches("\\P{Arabic}+")
Here's the exception:
An exception in the "main" thread java.util.regex.PatternSyntaxException: Unknown symbol property name {Arabic} next to index 9 \ P {Arabic} +
source share