I want to extract patterns that appert several times in a row. For example, getting two arrays of two integers from a string
wahoaet56oihaioet67jlkiwoeah67ladohwae45lkaowearho56
I thought result="wahoaet56oihaioet67jlkiwoeah67ladohwae45lkaowearho56".match(/([0-9]{2})/) should provide a MatchData object, the captures method should give me an array of matching patterns, but something seems to be missing me. It returns only the first find. Even using $1,$2,$3 , etc. Does not work. I am using ruby
How should I do it?
source share