I am trying to split a text that I got from a .docx (Arabic) using preg-split. The text sample:
صادر في16 الفقرة الأولى :المتعلق (ج. ر. بتاريخ 8 ذو القعدة 1435 -ويجوز بالتالي إصدار الأمرالفقرة4: القعدة
I need to split my text according to the following rules:
either المادة\s\d\:\n
or المادة الأولى\s\:\n
I tought of a multiple pattern, like so:
$pattern = "/(الفقرة \s\d\:\n)|(الفقرة الأولى\s\:\n)/";
$splitted_para_arr = preg_split($pattern,$content,null,PREG_SPLIT_NO_EMPTY);
The result I get is an unsplitted array:
Result:
Array
(
[0] =>
صادر في16 الفقرة الأولى :المتعلق (ج. ر. بتاريخ 8 ذو القعدة 1435 -ويجوز بالتالي إصدار الأمرالفقرة4: القعدة
)
I am using sublime text as editor, and xampp as webserver