You have to escape the slashes and asterisk in the regex, as they are
regular expression characters. http://rubular.com is a great place to
learn
and play around with regular expressions.
text.gsub(/\/\* start \*\/(.*)\/\* end \*\//im, replace_with)
BTW, is it possible that during the replace, it leaves the start/end
tag?
Currently it is replacing it also, I want the comments to be there after
the replacement.