I have many strings of this format “100-99090000-02” and i want to take out the part after the second “-” and the 2nd “-” itself. How would i do that. I am unsure if the length of the string will change later so i cannot just simply trim the string according to the last 3 characters.
You use Split and substring to do this
ArrayVariable = YourString.Split("-"c)
Give me your desired output
Mark as solution if this helps
my desired output is “100-99090000”
ArrayVariable = YourString.Split(“-”)
StringVariable = ArrayVariable(0) + “-” + ArrayVariable(1)
Mark as solution if this helps
Thanks
Ahh i think i see the logic here. Thanks beforehand. Ill mark it the solution when it works
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.