I have a some HTML text in mathjax format:
text = \"an inline \\\\( f(x) = \\frac{a}{b} \\\\) equation, a display equation \\\\[ F = m a \\\\] \\n and anothe
Not sure if your regexp is right - but in Ruby, Regexp are delimited by //, try like this :
//
desired = text.gsub(/(\\[)(.*?)(\\])/, "")
You were trying to do string substition, and of course gsub wasn't finding a string containing (\\[)(.*?)(\\])
(\\[)(.*?)(\\])