I have a dict like this :

```
my_dict = {
    "['000A']":
        ['1653418_a0001b001.jpg',
         '2132018_a0002b002.jpg',
         '4789562_a0001b003.jpg',
         '8469844_a0009b004.jpg',
         '4815099_a0004b000.jpg',
         '9085654_a0001b001.jpg',
         '9742212_a0007b002.jpg',
         '1325874_a0002b009.jpg',
         '1474856_a0090f014.jpg']
    ,
    "['000B']":
        ['1653418_a0001b001.jpg',
         '2132018_a0002b002.jpg',
         '4789562_a0001b003.jpg',
         '8469844_a0009b004.jpg',
         '4815099_a0004b000.jpg',
         '9085654_a0001b001.jpg',
         '9742212_a0007b002.jpg',
         '1325874_a0002b009.jpg',
         '123456_a0090f020.jpg']
}

```

And I want to find the highest number following the "b" for each keys of the dict

```
for key, value in my_dict
    number = re.findall('\d+', string)
    #convert it into integer
    number = map(int, number)
    print("Max_value:",max(number))

```

It doesn't work because then it would find the value at the begining of the string. I was thinking then to use a `.endswith(("....."))`

But still, I don't know how to formulate it to match my need, which would be a pattern that after `'b'` matches 4 numbers or 4 number followed by `'.jpg'` or even `endwith` `'b'` + 4 numbers and `'.jpg'`
but also I would like the code to find what number is the highest bXXXX and then return :

```
{"['000A']": '1474856_a0090f014.jpg', "['000B']": '123456_a0090f020.jpg'}

```