删除 PHP 中括号之间的日期

Remove date between parentheses in PHP

我会使用 正则表达式 .

删除括号中的日期,包括我们自己的括号 PHP

示例:Artist - title (2016)

我想要这个:Artiste - title

我尝试了很多东西,但一直没有得到具体的结果。

如何操作?

试试这个:

$string = "Artist - title (2016)";
echo preg_replace("/\([^)]+\)/","",$string); // Artist - title