title: Ruby: Extracting Words From String
body: <p>I'm trying to parse words out of a string and put them into an array. I've tried the following thing:</p>
  
  <pre><code>@string1 = "oriented design, decomposition, encapsulation, and testing. Uses "
  puts @string1.scan(/\s([^\,\.\s]*)/)
  </code></pre>
  
  <p>It seems to do the trick, but it's a bit shaky (I should include more special characters for example). Is there a better way to do so in ruby? </p>
  
  <p>Optional: I have a cs course description. I intend to extract all the words out of it and place them in a string array, remove the most common word in the English language from the array produced, and then use the rest of the words as tags that users can use to search for cs courses.</p>