<?php $re = '`(?<=\()\w+(?:[,\h]+\w+)*(?=\))`'; $str = 'Citrus fruits (oranges, mandarins lemons) have many nutrients'; preg_match($re, $str, $matches); print_r(preg_split("~[,\h+]~", $matches[0], -1, PREG_SPLIT_NO_EMPTY));
You have javascript disabled. You will not be able to edit any code.