Input:
MECR-tree obtained using \textbf{MCAR-Miner} with $S_{\mathrm{U}} = data$ 25{\%} and $S_{\mathrm{L}} = string$ 12.5{\%}
Change it to Title Case but exempt the text within the $ signs.
Output should be:
Mecr-Tree Obtained Using \textbf{Mcar-Miner} With $S_{\mathrm{U}} = data$ 25{\%} And $S_{\mathrm{L}} = string$ 12.5{\%}
Here's an example that assumes that the
$
character will always occur in pairs:Using a list comprehension: