Re: extract fields from string using multiple-space delimiter?

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 03 2014 - 13:35:00 MST

Jared,

Have you tried str_fields_count and str_get_field?
These functions should work with multiple delimiters.
Otherwise, send us the error message, and a sample dataset.

Regards,

Wei

huangwei@ucar.edu
VETS/CISL
National Center for Atmospheric Research
P.O. Box 3000 (1850 Table Mesa Dr.)
Boulder, CO 80307-3000 USA
(303) 497-8924

On Jan 3, 2014, at 1:23 PM, Jared Lee <jaredlee@ucar.edu> wrote:

> Hi, I'm trying to parse out the fields from the column title line of a
> table, which has the following format:
>
> "Var 1 [units] Var 2 [units] Var 3 [units]"
>
> Each column title is separated by at least two spaces, and never only
> one space. However, to the best of my understanding, the functions
> str_fields_count and str_get_field cannot use multiple consecutive
> spaces (or multiple consecutive anything) as a delimiter, without also
> couting single spaces as a delimiter. Is there any way in NCL to parse
> out fields from a string using double spaces but *NOT* single spaces as
> a delimiter?
>
> Jared
>
> --
> ================
> Dr. Jared A. Lee
> Postdoctoral Research Scientist
> National Center for Atmospheric Research
>
> Phone: 303.497.8485
> Email: jaredlee@ucar.edu
> Web: https://staff.ucar.edu/users/jaredlee
> ================
>
> _______________________________________________
> 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 Fri Jan 03 13:35:14 2014

This archive was generated by hypermail 2.1.8 : Mon Jan 06 2014 - 13:09:53 MST