I have preg_match_all(\'/[aäeëioöuáéíóú]/u\', $in, $out, PREG_OFFSET_CAPTURE);
preg_match_all(\'/[aäeëioöuáéíóú]/u\', $in, $out, PREG_OFFSET_CAPTURE);
If $in = \'hëllo\' $out is:
$in = \'hëllo\'
$out
arr
Another way how to split UTF-8 $string by a regular expression is to use function preg_split(). Here is my working solution:
$string
$result = preg_split('~\[img/\d{1,}/img\]\s?~', $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
PHP 5.3.17