I want to match anything inside parentheses but the result must exclude the parentheses as well.
Examples: Initialize(P90W) Brake(45X)
try this:
var pattern = @".*public.*(.*\(.*\))"; Regex.Matches(input,pattern)