Remove text befor comma or dot


I have a string: text1.text2 (the length of the text is different in each sting)

I would like to get text after dot (or comma): text2

How could I do it?


if your β€œ.” occurs only once you can use .Substring and IndexOf

strText = β€œtext1.text2”

strText2 = strText.Substring( strText.IndexOf(".")+1, strText.Length - strText.IndexOf(".")-1 )

If you have multiple instances you can split the string by the β€œ.” and the output is an array and you can select the value you need from the array.


Wow:) It works! Of course I have more than one dot, then I use β€œ:” between text1 and text 2
Thank you.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.