[Solved] How to get string between two underscores? [closed]


str = "IV_04.03.2019-10-56-45_example_c584536f-ab26-40ce-b5b6-386f755ba747_1.csv"
s1= str.split("_")[2]
s2= str.split("_")[3]
print (s1)
print (s2)

output:

example
c584536f-ab26-40ce-b5b6-386f755ba747

3

solved How to get string between two underscores? [closed]