octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51589] crash on regexp


From: anonymous
Subject: [Octave-bug-tracker] [bug #51589] crash on regexp
Date: Thu, 27 Jul 2017 15:24:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #3, bug #51589 (project octave):

Well Rik, not entirelly...

...the file I need to parse is a bit more complicated. It consists of several
blocks of data following one another in a single file. Each block has a header
of serveral linse of text and many records of data. These are organized in
several columns. Have a look at line 1505, 3008 or 4511 in oc.txt to see some
of the other block headers.

The goal I am trying to achieve is to parse this type of file into some kind
of data structure which octave can handle. As far as I know, neither octave
nor Matlab has any kind of function, which would offer an easy way to parse a
multi block file with arbitrary formated headers for each block. Please let me
know if I'm wrong and there is such a way.

As the headers vary as well as the number of records (lines) per block vary as
well, I figured that the most flexible way is to find the first and the last
data point in every block and separate them tha way. This is what that regexp
is supposed to do. It's the best I could come up with...

I am pretty aware  that using regexp for this porpose is quite heavy handed
(the data in oc.txt is only a really tiny example. Real data files have many
more blocks whith each block having many more records with way more columns.
Data file size can exceed 1GiB easily.) So if you know some better way to
achieve this I'd be happy to know...

Thanks 

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51589>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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