need to get everything after 2nd dash in string?

I have strings values like,

string str1 = "123-456-test";
string str1 = "123 - 456 - test-test";
string str1 = "123-REQ456-test";
string str1 = "123 - REQ456 - test-test";

I need to grab entire content from string right after 2nd dash.

I tried split(‘-‘), but not worked. I think I need to use Regex, but I am not able to find Regex, please suggest on this.


Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.