I am trying to use a pattern matching regular expression to extract the 9 characters in the middle of the file name string below to a token. So basically, in the 1st example below, i need "9Z0958097" to be extracted to a token and in the 2nd example i need "190188322". The string i need extracted is always 9 characters (either only numbers or mix of numbers and letters).
If it helps, the file name always ends with the same string of characters - _PUY_PUM_NOT
Any help with how to frame the regular expression would be appreciated. Thank you.
Example File Names Below.