regular expression to search for anything in square brackets code example
Example: regex get text between braces
$text = 'ignore everything except this {{ text1 }}';
preg_match('#\{\{(.*?)\}\}#', $text, $match);
var_dump($match);
$text = 'ignore everything except this {{ text1 }}';
preg_match('#\{\{(.*?)\}\}#', $text, $match);
var_dump($match);