title: Ruby extract data from string using regex
body: <p>I'm doing some web scraping, this is the format for the data</p>
  
  <pre><code>Sr.No.  Course_Code Course_Name Credit  Grade   Attendance_Grade
  </code></pre>
  
  <p>The actual string that i receive is of the following form</p>
  
  <pre><code>1 CA727 PRINCIPLES OF COMPILER DESIGN 3 A M
  </code></pre>
  
  <p>The things that I am interested in are the Course_Code, Course_Name and the Grade, in this example the values would be</p>
  
  <pre><code>Course_Code : CA727
  Course_Name : PRINCIPLES OF COMPILER DESIGN
  Grade : A
  </code></pre>
  
  <p>Is there some way for me to use a regular expression or some other technique to easily extract this information instead of manually parsing through the string.
  I'm using jruby in 1.9 mode.</p>