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
string input = "User name (sales)"; string output = input.Substring(input.IndexOf('(') + 1, input.IndexOf(')') - input.IndexOf('(') - 1);