Possible Duplicate:
Can regular expressions be used to match nested patterns?
I have a string like this:
$string = "Hustlin' ((Remix) Album Version (Explicit))";
and I want to basically remove everything in parentheses. In the case above with nested parentheses, I want to just remove it at the top level.
So I expect the result to just be "Hustlin' "
.
I tried the following:
preg_replace("/\(.*?\)/", '', $string);|
which returns the odd result of: "Hustlin' Album Version )"
.
Can someone explain what happened here?