Create a string variable before the retrieve activity.
Value of the string variable => substring($Document/Name,6,3)
Use the output string variable a constraint in your retrieve
[DocumentType= 'Meta_Data_File']
[Name= $StringVariable]
and if you are searching for all documents containing these 3 characters:
[DocumentType= 'Meta_Data_File']
[contains(Name= $StringVariable)]
I don’t think this works in XPath statements. Use a Microflow instead.