help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex-matched formatted input, or selecting a few columns in a CSV f


From: novakyu
Subject: Re: regex-matched formatted input, or selecting a few columns in a CSV file?
Date: Wed, 16 Jan 2008 12:28:10 -0800

On Jan 16, 2008 12:14 AM, Muthiah Annamalai <address@hidden> wrote:
>
> Octave has support for fscanf(), regexp() and friends, and since you use
> PERL already,

But all I could think of feels like such a kludge even before I start.
I mean, aside from having to loop over the lines (whereas fscanf
returns a nice matrix in a single command), I see:

 -- Loadable Function: [...] = regexp (STR, PAT, OPTS, ...)
     Regular expression string matching. Matches PAT in STR and returns
     the position and matching substrings or empty values if there are
     none.

It looks to me like regexp will return a string, which has to be
turned into a number with str2double and such.

So I was hoping that there was something already nicely implemented,
like fscanf, except with regex matching capability. Is there such a
function (built-in or otherwise)?

Regards,

Andrzej


reply via email to

[Prev in Thread] Current Thread [Next in Thread]