I'm trying to match only arabic text using regex but I'm getting an exception. Here's my code:
txt.matches("\\P{Arabic}+")
Here's the exception:
Exception in thread "main" java.util.regex.PatternSyntaxException: Unknown character property name {Arabic} near index 9 \P{Arabic}+