试试这个
$result = preg_replace('/\(([^)(]+)\)/', '$1', $subject);
更新
\(([^\)\(]+)\)(?=[^\(]+\()
正则表达式解释
"
\( # Match the character “(” literally
( # Match the regular expression below and capture its match into backreference number 1
[^\)\(] # Match a single character NOT present in the list below
# A ) character
# A ( character
+ # Between one and unlimited times, as many times as possible, giving back as needed (greedy)
)
\) # Match the character “)” literally
(?= # Assert that the regex below can be matched, starting at this position (positive lookahead)
[^\(] # Match any character that is NOT a ( character
+ # Between one and unlimited times, as many times as possible, giving back as needed (greedy)
\( # Match the character “(” literally
)
"