Fixed regex in wolfram substitution