Fix regex escape for ruby 1.8