Re: RegEx for Function Declarations

Brady Kelly <[email protected]> Wed, 30 Jan 2008 12:49:39 +0200
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
Thanks Ryan, that should help, even with just \w+ for a field name for now.
One more though, how would I capture the field name?

sum|max|min)\((?(fieldName)\w+)\)|(count)\(\))  ??

Then how to access that field name?


> How about something like
>
> ((sum|max|min)\((\w+)\)|(count)\(\))
>
> you may want to alter \w+ into something that matches your field names
> better.
>
> // Ryan
>
> On Jan 30, 2008 9:45 AM, Brady Kelly <[email protected]> wrote:
> > I'd like to parse aggregate function declarations, as in Sum('x'),
> where x
> > is a field name.  I'd love to break out a regex explorer and
> experiment, but
> > I have a demo in three hours and would appreciate some assistance.
> The set
> > of functions is finite, i.e. Count(), Sum(x), Max(x), Min(x).

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com