I have a requirement in my ruby code.I’m using ruby 1.9.2 and rails 3.0.
I have a string like “SR2G1M1D2”.Now i want to split it and extract values like [S,R2,G1,M1,D2] .It’s like whenever next value is character it should split.Is there any ruby function or code available.
Thanx
Hope this helps.