Aha, another quick lesson learned. In Ruby, the regular expression is an object unto itself with its own syntax. So to do a simple search and replace you do something like this:
"The quick brown fox".gsub /brown/, "purple"
which replaces the results of a match with regular expression "brown" with the string "purple".
But what if you wanted to do something more dynamic, like, say, matching a color based on a variable? You can just as easily do this:
"the quick brown fox".gsub color, "purple"
And it will work. Ay, though, but here's the rub -- it's no longer matching it as a regular expression. Try this test:
input = "start: data"
data = input.gsub! "start:( +)", ""
that should strip off the start: as well as one or more spaces, right? Nope. It fails to match. That's because since I'm passing a string it's not evaluating it as a regular expression.
Wrap that first element in a constructor for Regexp: Regexp.new("start:( +)") and you'll get the right answer.