You can just put this all inline, it's still pretty readable, like so:

```
state['service'].split(":").select { |el| el !~ /^\d+$/ }.last
```

In this case though, I'm think what we actually want to do is concatenate the last two if the last one is just a number. In the future, I think there may be other versions of things (:2 etc) that may need other implementations. So for this one, maybe it should be something more like

```
parts = state['service'].split(":")
parts.last =~ /^\d+$/ ? parts[-2..-1].join : parts[-1]
```

How does that sound?