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
If you wish to stay away from regular expressions, the simplest way I can think of is:
string input = "User name (sales)"; string output = input.Split('(', ')')[1];