Using the code below, I can turn Number123(45)
into Number
.
$string = 'Number123(45)';
$string2 = preg_replace('/[0-9]+/', '', $string);
echo $string2;
How would I only remove the numbers inside parentheses (brackets) so that the output is Number123()
?