How do I extract a string of text that lies between two (brackets) using .NET?

Posted by Ben H on Stack Overflow See other posts from Stack Overflow or by Ben H
Published on 2008-12-18T16:32:27Z Indexed on 2010/03/26 3:03 UTC
Read the original article Hit count: 315

Filed under:
|
|

I have a string "User name (sales)" and I want to extract the text between the brackets, how would I do this? I suspect substring but I can't work out how to read until the closing bracket, the length of text will vary.

© Stack Overflow or respective owner

Related posts about c#

Related posts about string-manipulation