Given an expression such as
(exp(-((-mx + x - y)^2/(2 s1^2))2x - 2y (-my + y)^2/(2 s2^2)))/(2
pi sqrt(s1^2) sqrt(s2^2)
what is an easy way to detect all where multiply occurs? The above expression is uniquely defined. Variables cannot start with numbers and two variables multipled will always be separated by a space.
I.e. what regular expression (or other method) can be used to turn the above into
(exp(-((-mx + x - y)^2/(2*s1^2))*2*x - 2*y*(-my + y)^2/(2*s2^2)))/(2*
pi*sqrt(s1^2)*sqrt(s2^2)
Python or regex solution would be preferred.