Create expected regexp from string for ruby 2

Ruby 2 changed how regular expressions are compared when it comes to
escape sequences (but I'm not sure how).  This change creates the
expected and actual regular expressions in the same manner avoiding a
failure on ruby 2.0.0.