csharp regex to find number between parenthesis

Code Example - csharp regex to find number between parenthesis

                
                        Regex.Match("User name (sales)", @"\(([^)]*)\)").Groups[1].Value
                    
                
 

csharp get string in parentheses

                        
                                string input = "User name (sales)";
string output = input.Split('(', ')')[1];
                            
                        
 

csharp regex extract string between brackets

                        
                                string input = "User name [sales]";
string output = input.Split('(', ')')[1];