<?php $pattern="\( ( (?>[^()]+) | (?R) )* \)"; $str="(def a (x) (+ 1 x))(print (a 1))"; preg_match_all($pattern,$str,$out); var_dump($out);
You have javascript disabled. You will not be able to edit any code.