You can use this regular exprestion \[(.*?)\]\s*\((.*?)\) and replace with $1 like so
preg_replace('/\[(.*?)\]\s*\((.*?)\)/', '$1', '[text](url)');
\[(.*?)\] select anything between [] and store it in first capture group
\((.*?)\) select anything between () and store it in first capture group
$1 use content of first capture group
preg_replace ( $pattern , $replacement , $subject )
take a look
Test if it works for you