Consider the following group:
([0-9 ]+)+
I capture matches that contain numbers and spaces, in the following string for example:
123 , 2133132, 31331, 22222222, 23......
would capture "23", the last match, but what I want is to be able to save all the matches, in this case it would have been five.
I'm trying to use perl, so I would have something like this:
echo "123 , 2133132, 31331, 22222222, 23....." | perl -pe "s/([0-9 ]+)+//g"
And then the same, only the last one.
Note: I am working on shell script, specifically ksh on Hp ux.