title: Extract all urls inside a string in Ruby
body: <p>I have some text content with a list of URLs contained in it.</p>
  
  <p>I am trying to grab all the URLs out and put them in an array.</p>
  
  <p>I have this code</p>
  
  <pre><code>content = "Here is the list of URLs: http://www.google.com http://www.google.com/index.html"
  
  urls = content.scan(/^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix)
  </code></pre>
  
  <p>I am trying to get the end results to be:</p>
  
  <pre><code>['http://www.google.com', 'http://www.google.com/index.html']
  </code></pre>
  
  <p>The above code does not seem to be working correctly.  Does anyone know what I am doing wrong?</p>
  
  <p>Thanks</p>