I’m attempting to make the preg_replace_callback return a match only if it doesn’t contain a certain character.
So if the string contains:
{xxxx}
return a match.
If it contains:
{xxxx|xxxx}
Don’t return a match.
Here’s my attempt:
\{(.*?!\|.*)}
Thanks you guys!
Your full pattern will be this:
Match any character that’s not a pipe, wrapped around curly braces.