concurrencyboy
0
Q:

c# regex to find number between parenthesis

Regex.Match("User name (sales)", @"\(([^)]*)\)").Groups[1].Value
1
\(             # 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"
0

New to Communities?

Join the community