I have a string User name (sales) and I want to extract the text between the brackets, how would I do this?
User name (sales)
I suspect sub-string but I can\'t work out
Much similar to @Gustavo Baiocchi Costa but offset is being calculated with another intermediate Substring.
Substring
int innerTextStart = input.IndexOf("(") + 1; int innerTextLength = input.Substring(start).IndexOf(")"); string output = input.Substring(innerTextStart, innerTextLength);