<?php $s = "[test1](test2) testing the regex [test3](test4)"; preg_match_all("/(\[.+?\])(\(.+?\))/i", $s, $m); var_dump($m[1]); var_dump($m[2]);
You have javascript disabled. You will not be able to edit any code.