Regex doesn't match Arabic text when using lookahead assertion
I am trying to split the text:
شكرا لك على المشاركة في هذه الدراسة. هذا الاستبيان يطلب معلومات عن:
stored in
$sentences = "شكرا لك على المشاركة في هذه الدراسة. هذا الاستبيان يطلب معلومات عن:";
with regex:
$pattern = "/(?<=\.)\s+(?=\p{IsArabic}+)/";
in function
preg_split($pattern, $sentences);
The regex doesn't match. It does match if I remove the lookahead assertion.
Why does that happen? What could be a workaround?