title: ruby: use regex to replace http://anything with <a href="http://anything">http://anything</a>
body: <p>I've seen a lot of variations on this question, but they usually are trying to either validate the 'anything' portion of the url, or provide different text for the anchor text vs the link.</p>
  
  <p>For a simple blog function for users, I need the application helper that returns the same text except finds any string that starts with <code>http://</code> (and ends in any whitespace or end of string) and replaces it with a <code>&lt;a href="same_string_here"&gt;same_string_here&lt;/a&gt;</code></p>
  
  <p>Any tips on how to do this with regex would be appreciated... I figured out bits and pieces (grab a word starting with http) but cannot get the whole thing to work (can't figure out how to put it into the template with quotes around the href, handle the <code>://</code> in the test, or put the string in a second place before the <code>&lt;/a&gt;</code>).</p>