Removing specific numbers and character from name string

I have a python function that pulls all my .md files from a folder and turns them all into html files while also making one big markdown file.

import glob
import os
import markdown

def main():
    file_list_md = glob.glob(os.path.join("\\servermame\prod_help_file\input\*", "*.md"))
    file_list_html = glob.glob(os.path.join("\\servername\prod_help_file\input\*", "*.html"))
    config = {
        'extra': {
            'footnotes': {
                'UNIQUE_IDS': True
    with open('\\servername\prod_help_file\', 'w') as output:
        for x in file_list_md:
            with open(x, 'r') as body:
                text =
                html = markdown.markdown(text, extensions=['extra'], extension_configs=config)
                y = x.replace('input', 'output')
                k = y.replace('.md', '.html')
                with open(k, 'w') as output2:
                    with open(file_list_html[0], 'r') as head:
                        text =
                    with open(file_list_html[1], 'r') as foot:
                        text =

if __name__ == "__main__":

but I have to use the full directory and to keep them in order the files have 5 numbers and an underscore like this:


and I want the output file to be like this:


without the numbers or underscore. is there any ways to remove the 5 numbers and underscore only?


import re

txt = "The rain 85452_in Spain"
x = re.sub(r"d{5}_", "", txt) # Subtitute 5 digits of number with underscore with empty string