I have some problem with my regular expression. I need to find all functions in text. I have this regular expression \w*\([^(]*\). It works fine until text does not contais brackets without function name. For example for this string 'hello world () testFunction()' it returns () and testFunction(), but I need only testFunction(). I want to use it in my c# application to parse passed to my method string. Can anybody help me?
Thanks!
I have some problem with my regular expression. I need to find all functions
Share
Try
\w+\([^(]*\)Here I have changed \w* to \w+. This means that the match will need to contain atleast one text character.
Hope that helps