Answers for "how to remove extra parentheses in a string using php"

PHP
1

php remove parentheses and contents from string

$string = "ABC (Test1)";
echo preg_replace("/\([^)]+\)/","",$string); // 'ABC '
Posted by: Guest on June-24-2021

Code answers related to "how to remove extra parentheses in a string using php"

Browse Popular Code Answers by Language