我想替换 { 中包含的字符串中的内容content}。它是多行等。 preg_replace 函数应该删除整个 {com 没有垫子 蒙特 }
尝试这个:
$result = preg_replace('/\{[^}]*\}/s', 'replacement content', $subject);