Found best regular expression (so far) for inline math

New regex successfully passed all my tests, as long as you keep no
spaces between dollar signs:

* this is an equation:     $E=mc^2$
* this is NOT an equation: $ E=mc^2$, $ E=mc^2 $, $E=mc^2 $, ...