<?php $fullString = 'ignore everything except this (text) and (that (text here))'; if (preg_match_all('~\(([^()]*)\)~', $fullString, $matches)) { print_r($matches[0]); // Get whole match values print_r($matches[1]); // Get Group 1 values }
You have javascript disabled. You will not be able to edit any code.