Take all characters after separator symbol after 5th sign

You can use Split to split the string on the '|' character, then the System.Linq extension method Skip to skip the first 5 results, and finally string.Join to connect the remaining parts together again using the '|' character to join them:

string result = string.Join("|", test.Split('|').Skip(5));

Leave a Comment