Split on non arabic characters

Viewed 1362

I have a String like this

أصبح::ينال::أخذ::حصل (على)::أحضر

And I want to split it on non Arabic characters using java

And here's my code

String s = "أصبح::ينال::أخذ::حصل (على)::أحضر";
String[] arr = s.split("^\\p{InArabic}+");
System.out.println(Arrays.toString(arr));

And the output was

[, ::ينال::أخذ::حصل (على)::أحضر]

But I expect the output to be

[ينال,أخذ,حصل,على,أحضر]

So I don't know what's wrong with this?

2 Answers
Related