I have a string in the format:
MyList.Where(abc).GroupBy(def).Sum(ghi)
The Where & GroupBy parts are optional as is the argument to the function, so.
ThisList.Count
is also valid.
I'm trying to find a RegEx string that will match this and return the values:
The List name (e.g. MyList), the where condition (e.g. abc), the GroupBy attribute (e.g def), the function name (e.g. Sum) and the function attribute (e.g. ghi).
Clarification:
The List name is one word
abc can be a complex expression, but there will be no close brackets which are not in quotation marks
def will be a single word
ghi will be a single word or a list of words separated by ","