Build, test, and debug regular expressions
Matches LaTeX-formatted chemical molecule formulas, including element symbols, subscripts with optional braces, parenthesized groups, and charge superscripts (e.g., H_2O, C_6H_{12}O_6, (OH)_2, Ca^{2+}, SO_4^{2-}). Useful for parsing or extracting chemical equations embedded in LaTeX documents.