I want to parse a SQL statement which may use a SQL function inside the query text. Now using C# regex I'd like to parse the string and check if there is any function name(s) used inside the query and extract those. There may be multiple functions used inside the query and each function can have n number of parameters which is not known from before hand.
select * from fnTest(@A, @B)
select x.* from fnTest(@A, @B) x join fnHelloWord(@C, @D, @E) y on x.SomeID = y.OtherID
- In the first sample the regex would return a string value
fnTest. - In the second sample the regex would return a list of function name strings like
fnTestandfnHelloWord
