Regular Expresion (regex) : removing () chars and anything inside
This article contain example to remove characters inside ( ) here is how :
$string = 'Indonesia (Bahasa Indonesia) / Malaysia (Bahasa Melayu)Singapore' echo $string.' '; $string2 = preg_replace("/\(.*?\)/",'',$string); echo $string2;
Should now eliminates all () and anything inside