How to replace string in parentheses using regex
PHP, Java and other languages provide replace all functionality to replace any character by any specific character. But REGEX is best method to replace or remove any specific value using pattern.
Suppose, we have input string is
$xyz = "This is my best (friend)";
and we want to remove words from “()”.
So it so straight forward and simply: