I have an array with a single element shown below:
array = [ 'c32860:x:3105:dputnam,kmathise,hhoang3,nhalvors,jchildre\n' ]
I want to create a new array that looks like this:
array2 = [ 'dputnum', 'kmathise', 'hhoang3', 'nhalvors', 'jchildre' ]
How would I accomplish this using Ruby and/or regex in a fairly clean way? I'm very new to programming and I did a bunch of ghetto things such as array-to-string-back-to-array conversions, .reverse.chomp.reverse shenanigans, and still could not end up with the result I wanted. Help appreciated!