How to split the string from Colon (:) or fetching specific first or second colon string in C#, TypeScript
Sample -> String test :"error: 123: TT - old date"
1. Need to split and fetch the string after the second colon, then use the below logic :
const secondColonIndex = test.indexOf(":", test.indexOf(":") + 1);
return secondColonIndex !== -1 ? test.substring(secondColonIndex + 2) : '';
2. Need to split and fetch the string after the first colon, then use the below logic :
test.substring(test.indexOf(":") + 2) : '';