c# regex to find number between parenthesis
Regex.Match("User name (sales)", @"\(([^)]*)\)").Groups[1].Value
c# regex to find number between parenthesis
Regex.Match("User name (sales)", @"\(([^)]*)\)").Groups[1].Value
c# regex to find number between parenthesis
\( # Escaped parenthesis, means "starts with a '(' character"
( # Parentheses in a regex mean "put (capture) the stuff
# in between into the Groups array"
[^)] # Any character that is not a ')' character
* # Zero or more occurrences of the aforementioned "non ')' char"
) # Close the capturing group
\) # "Ends with a ')' character"
c# get string in parentheses
string input = "User name (sales)";
string output = input.Split('(', ')')[1];
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us