Question: I have an array that I am looping through and pushing specific values to a separate array. EX:

```
first_array = ["Promoter: 8", "Passive: 7"]

```

I want to push every value that is an integer to a separate array, that would look like this in the end:

```
final_array = [8,7]

```

It would be nice for the values in the new array to be integers. I can't think of a way to push all numeric values within a string to a new array, but what would be the best option to do what I am wanting?

Answer: 
```
first_array.map{|s| s[/\d+/].to_i}
# => [8, 7] 

```
And I have to add this super short but complicated one-liner solution:

```
a = ["Promoter: 8", "Passive: 7"]
p a.grep(/(\d+)/){$&.to_i} #=> [8,7]

```