Can someone let me know how to extract string between ‘_’ and ‘. xlss’ from the below example.
Invoice_00ABCD.xlss
I need 00ABCD only, no matter how many characters are there in middle of ‘_’ and ‘.xlss’
Please suggest.
Can someone let me know how to extract string between ‘_’ and ‘. xlss’ from the below example.
Invoice_00ABCD.xlss
I need 00ABCD only, no matter how many characters are there in middle of ‘_’ and ‘.xlss’
Please suggest.
Can you try assign activity with System.text.regularexpressions.regex.match(“your string”,"_(.*).xlss$").groups(1).tostring
Hi
Welcome back to UiPath forum
If your input is in a string variable named Strinput
Then use a assign activity and mention the below expression
Stroutput = Split(Split(Strinput.ToString,”.”)(0),”_”)(1).ToString.Trim
Hope this would help you resolve this
Let’s say inputString =“Invoice_00ABCD.xlss”
outputString = inputString.Split("_"c)(1).Split("."c)(0).Trim
Hi @Raj_Sekhar
This will be another approach,
strText - your input string
strText.Substring(strText.indexof("_")+1,(strText.Indexof(".xlss")-strText.indexof("_"))-1)
Thanks
Thank you it worked