I can match this string {string} by using this regex : /{(.*)}/s in PHP’s preg_replace_callback function.
But I don’t what to match that string if that string is contained between tags like {tag}{/tag},
For example :
I don’t want to match {string} in {tag} Anything Here {string} Anything Here {/tag}.
Any suggestions (or maybe examples) are most welcome.
You can play with that :
As you will see, that expression will return a m with three array elements. The second array ellement contain all the {string} that are not into {tag}….{string}….{/tag}