Need help,
Input string 1: a/b/c/d/efgh
Input string 2: a/b/c/ighjkl
Need OutPUt:
Ouptut 1: a/b/c/d
Output 2: a/b/c/
Need help,
Input string 1: a/b/c/d/efgh
Input string 2: a/b/c/ighjkl
Need OutPUt:
Ouptut 1: a/b/c/d
Output 2: a/b/c/
we can do it with regex:
or using string method Split and join it again
As an alternate (optimistic approach)
Hello Mahaveer,
You can simply do it by
str.Substring(0,str.LastIndexOf(“/”)).ToString
where str must be you string variable.
Hope this helps.
Regards,
Saloni
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.