There is a line:
text_left {text_internal_figure_block} right_text
It is necessary to transform parts of a string using a regular part, not inside curly brackets, with a custom function, for example, you can use mb_strtoupper .
TEXT_LETTER {text_in_figured_box} TEXT_SPRAVA
([^{]+)(?>{)(?>[^}]+)(?>})(.*)- br3t