rails4-compat

Address this error under rails4: "The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option?"

More background here: https://github.com/rails/rails/pull/6569