title: You tube on Rails - regular expression
body: <p>I am trying to integrate you tube with my rails 4 app.</p>
  
  <p>I am following this tutorial: <a href="http://www.sitepoint.com/youtube-rails/" rel="nofollow">http://www.sitepoint.com/youtube-rails/</a></p>
  
  <p>I have added this validation on my video model:</p>
  
  <pre><code>YT_LINK_FORMAT = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&amp;v=)([^#\&amp;\?]*).*/i
  
  validates :link, presence: true, format: YT_LINK_FORMAT
  </code></pre>
  
  <p>I get this error when I try it:</p>
  
  <pre><code>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 =&gt; true option?
  </code></pre>
  
  <p>Is there a safe way of using this concept?</p>
  
  <p>Thank you</p>