I have a string path='/home/user/Desktop/My_file.xlsx'
.
I want to extract the "My_file"
substring. I am using Django framework for python.
I have tried to get it with:
re.search('/(.+?).xlsx', path).group(1)
but it returns the whole path again.
Can someone please help.