I need your help how can I remove anything after and before curly brackets {}
in PHP
. But I don't want to remove curly brackets
and content inside it so if there is anything after of before curly brackets.
I tried this:
preg_replace('/.[^{]|[^\n{]+.+[^}|}]./', "", $string)
But it doesn't work.