similiar like this example, php: remove brackets/contents from a string? i have no idea to replace
$str = \'(ABC)some text\'
into
Instead of preg_replace, I would use preg_match:
preg_match('#\(([^)]+)\)#', $str, $m); echo $m[1];