I have a string like "1 first - 22 second - 7 third", and I need to get the integer value for each item. For example, if I want get the third value they will return 7.
I tried with this code but it doesn't work:
item = detail.scan(/( - )\d( second.*)/)