Re: regular expression

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Apr 2009 16:15:25 -0600 (MDT)

Hi Oliver,

We don't have any plans for regular expression string matching,
but I'll add it to our official enhancement request list.

Meanwhile, to expand on what Jamie suggested, we have implemented
a suite of string functions to make string parsing easier in
NCL. We are in testing and documentation mode right now, and will
announce something when we are finished.

--Mary

On Thu, 2 Apr 2009, Jamie Scott wrote:

> Oliver,
>
> Have you tried this function?
>
> indStrSubset
>
> -Jamie
>
> On Apr 2, 2009, at 9:01 AM, ncl-talk-request_at_ucar.edu wrote:
>
>> Dear all,
>>
>> I was just wondering if there are any plans to include regular
>> expression string matching into NCL one day. We are relying a lot on
>> the NCL grib reading functionality. The names given to variables and
>> dimensions are typically of the type...
>>
>> TOT_PREC_GDS10_SFC_acc1h
>> g10_x_1
>>
>> ...where the first is a variable name and the second is a dimension
>> name. In trying to write a library which can access variables in
>> files, one of the tough bits is parsing the variable and dimension
>> names. For example, typically, an increasing index is attached to
>> the names if duplicates are encountered. Also, grid types and
>> accumulation times are included in the name. A typical job of a user-
>> friendly library would be to match the list resulting from
>> getfilevarnames(f) against "TOT_PREC_GDS*_*_acc*". In making such
>> matches a simple string comparison routine which also takes care of
>> "*" and "?" would be great. This could be easily achieved by linking
>> against GNU regex library and building an NCL wrapper. Are there
>> already any plans for this functionality?
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 06 2009 - 16:15:25 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 10:01:36 MDT