I’m trying to replace the contents inside braces on a string with preg_replace_callback. Here’s an example string :
230|321;312|123;{413|333;413|334;413|335};583|221
What I want to do is being able to replace what’s inside braces ({413|333;413|334;413|335}) with something else, but I can’t quite figure out how to go as for the regex expression. I’ve tried some but with no results.
Little help?
Thanks!
If you want to match everything from opening brace to close brace: