I am looking for a regex expression for preg_replace($the_expression, “”, $old_text)
I have text like:
{some text} Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only {varying text} five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s {some other text}with the release of Letraset sheets containing
I want to target any varying text inside curly brackets, and the curly brackets too, and replace with “” (nothing).
The regex that you’re looking for is something like this:
Which matches:
So, in
preg_replace(), it would be: