I have a series of string like the following one:

*abc\_8g\_1980\_312.tif*

from which I would like to extract the string '312' i.e. everything between the 3rd underscore and the file extension'.tif' string.

I'm trying using this website <https://regex101.com/>
inserting this regular expression: `(\d{3})(\.tif$)`

but I'm not getting what I would like to have.

Any suggestions would be appreciated.