Split string to get text which varies

Hello I want to extract some text to save in a variable from a file path but the text which I would want to extract changes. Can I do this from number of \s or better would be to go from right as it is text always between the final \ and 【

Below is the string
\My Documents\RPA\UiPath\SalesStuff\Project1\20190621【ReadOnly】2019_ExcelFile.xlsm

I would want to get the changing string 20190621


Try this:

str = “\My Documents\RPA\UiPath\SalesStuff\Project1\20190621【ReadOnly】2019_ExcelFile.xlsm”


1 Like

Comes up blank, could you explain what the line means?


Sorry it’s my bad.

Check this:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.