regular expression

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Wed, 1 Apr 2009 22:09:48 +0200

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


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

Kind regards,

PS. For the moment I am working with a homebrewn NCL routine which can handle one wildcard character as well as an external shared object generated from
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Apr 01 2009 - 14:09:48 MDT

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