> is there a nice, clean, ruby way to do this?

Have a look at String#scan