<?php $string='Demo #1: (11 steps)[1] and Demo #2: (35 steps)[2]'; var_export(preg_match_all('~\(([^)]*)\)\[([^\]]*)]~',$string,$out,PREG_SET_ORDER)?$out:[]);
You have javascript disabled. You will not be able to edit any code.