replace php templating variables between double curly braces that are nested inside two-character code delimiters
I am working on a custom minimalist PHP templating engine for use in personal projects, I need to solve how to make some replacements using a regular expression. I have this string: $string = 'sometext {% {{ var1 }} middletext…