Re: RegEx for Function Declarations

Per Bolmstedt <[email protected]> Wed, 30 Jan 2008 05:42:22 -0500
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <LISTSERV%[email protected]>
Not to be rude, but don't you think actually breaking out a regex explorer
would have been more efficient than asking basic regular expression
questions here and having to wait for answers to them?

On Wed, 30 Jan 2008 12:49:39 +0200, Brady Kelly <[email protected]>
wrote:

>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.
>>
>> 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