I'm trying to parse words out of a string and put them into an array. I've tried the following thing:
@string1 = "oriented design, decomposition, encapsulation, and testing. Uses "
The split command.
words = @string1.split(/\W+/)
will split the string into an array based on a regular expression. \W means any "non-word" character and the "+" means to combine multiple delimiters.