I have a list of strings, and I want to all the strings that end with `_1234` where `1234` can be any 4-digit number. It's ideal to find all the elements, and what the digits actually are, or at least return the 1st matching element, and what the 4 digit is.

For example, I have

```
['A', 'BB_1024', 'CQ_2', 'x_0510', 'y_98765']

```

I want to get

```
['1024', '0510']

```

Okay so far I got, `_\d{4}$` will match `_1234` and return a match object, and the `match_object.group(0)` is the actual matched string. But is there a better way to look for `_\d{4}$` but only return `\d{4}` without the `_`?