$text = 'ignore everything except this (text)'; preg_match('#((.*?))#', $text, $match); print $match[1];