# how to leave the name only numbers and underscores

I have many format name files ep00_seq00_sh00 need to make them 00_00_00 in the blender so that they themselves are inserted into the field I need. I can get the file name. But how to cut it is a mystery

• can you pls show us what format name files you mean and into what fields you want them insert in? maybe some screenshots? Jun 22 at 12:18
• took screenshots Jun 22 at 13:00
• Lol I think this is something I would do with a batch script Jun 22 at 13:03

Use a regular expression:

import re
name = 'sds01_as02'
print(re.sub(r'[^0-9_]+','',name))
# outputs '01_02'