Replacing text between dollar signs for Mathml expression.

You’re importing MatchDecorator but not using it? And why match the regexp yourself with .match and then also run a RegExpCursor?