I have value D\yuyu\rtrt\df.xlsx I want get value after \ (last text) —> expect output df.xlsx
D\uyu\uiu\uiui\ui.pdf —> expect output ui.pdf
Please guide me for solve it.
I have value D\yuyu\rtrt\df.xlsx I want get value after \ (last text) —> expect output df.xlsx
D\uyu\uiu\uiui\ui.pdf —> expect output ui.pdf
Please guide me for solve it.
Hi @Stef_99
You can try the below expression by using the Data Manipulations Split Function,
- Assign -> Input = "D\yuyu\rtrt\df.xlsx"
- Assign -> Output = Input.Split("\").last.toString
The Output Variable stores the df.xlsx.
Hope it helps!!
If you want to split text, have you tried the activity called “Split Text”? It splits text into a list of strings. Then you can get the last one like output(output.count-1)
Other approaches do work, but you should use the correct activities whenever possible.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.