title: Ruby Regexp group matching, assign variables on 1 line
body: <p>I'm currently trying to rexp a string into multiple variables. Example string:<br></p>
  
  <pre><code>ryan_string = "RyanOnRails: This is a test"
  </code></pre>
  
  <p>I've matched it with this regexp, with 3 groups:<br></p>
  
  <pre><code>ryan_group = ryan_string.scan(/(^.*)(:)(.*)/i)
  </code></pre>
  
  <p>Now to access each group I have to do something like this:<br></p>
  
  <pre><code>ryan_group[0][0] (first group) RyanOnRails
  ryan_group[0][1] (second group) :
  ryan_group[0][2] (third group) This is a test
  </code></pre>
  
  <p>This seems pretty ridiculous and it feels like I'm doing something wrong. I would be expect to be able to do something like this:</p>
  
  <pre><code>g1, g2, g3 = ryan_string.scan(/(^.*)(:)(.*)/i)
  </code></pre>
  
  <p>Is this possible? Or is there a better way than how I'm doing it?</p>