Test, validate and match regular expressions
This regex matches balanced curly brace groups, including nested braces, using PCRE2 recursion. It captures the entire content inside the outermost braces, making it useful for extracting LaTeX function bodies, command arguments, or any code blocks with balanced braces. The atomic group ensures efficient matching without unnecessary backtracking.