rahulgola
(Rahul Gola)
1
Hi Team,
I have a situation where i am trying to get the value as
string = XYz-aksjdf-ads77fasd-adsfdf558asdf-asdfasdf-01011
now i want just the = XYz-aksjdf-ads77fasd-adsfdf558asdf-asdfasdf
how do i split i am using the function split but getting only the last number value that is not required.
could somebody please help here
Hi @rahulgola,
Try the following:
YourString.Replace("-" + YourString.Split({"-"},StringSplitOptions.None).Last.Trim,"")
This should remove the last characters you don’t want
rahulgola
(Rahul Gola)
3
Thank you very much @william.coulson
Cheers,
Rahul
1 Like
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.