How do I extract text that lies between parentheses (round brackets)?

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];

Leave a Comment