I have a query, I have File Name : For Example Flag_in_DE_COUNTRY_20240422_102 Now I need only FLAG_in_DE_COUNTRY Can any one help me and thanks in advance
give a try on Regex

Assign Activity:
strPart =
System.Text.RegularExpressions.Regex.Match(yourStringVar, "^.*?(?=_\d+)").Value
Thank you so much @ppr
its working
Perfect, so the topic can be closed:
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum
For a closer look at Regex also find linked CheatSheet
[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.