public static function getTokens($template, $pre = '%%', $post = '%%')
    {
        $tokens = [];
        $regex = "/$pre(.*?)$post/";
        if (preg_match_all($regex, $template, $matches)) {
            $tokens = array_unique($matches[1]);
        }

        natsort($tokens);

        return $tokens;
    }