Hi,
I need to get text before AND after last “/”. Here are some examples:
MILES AWAY/SALA RAZZMATAZ/Spain
Glovo Glovo/Spain
Microsoft/Austria
Any suggestions?
Thx and KR, Vanja
Hi,
I need to get text before AND after last “/”. Here are some examples:
MILES AWAY/SALA RAZZMATAZ/Spain
Glovo Glovo/Spain
Microsoft/Austria
Any suggestions?
Thx and KR, Vanja
Hi @VanjaV
Can you try this
Input = "MILES AWAY/SALA RAZZMATAZ/Spain"
Value1 = System.Text.RegularExpressions.Regex.Matches(Input,"((?<=\/)\w+)").Last
Value2 = System.Text.RegularExpressions.Regex.Matches(Input,"(\w+(?=\/))").Last
Regards,
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Match(strData,"^.*(?=/[^/]*$)").Value
System.Text.RegularExpressions.Regex.Match(strData,"(?<=/)[^/]*$").Value
Regards,
Hi @VanjaV
Use below,
fullText = “Microsoft/Austria”
beforeLastSlash = fullText.Substring(0, fullText.LastIndexOf(“/”))
afterLastSlash = fullText.Substring(fullText.LastIndexOf(“/”) + 1)
If helpful, mark as solution. Happy automation with UiPath
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.