> ...
> > I am trying to parse some data that looks like:
[quoted text clipped - 11 lines]
>
> --
> dpb <none@non.net> wrote in message <g5fo6p$au6
> $1@aioe.org>...
[quoted text clipped - 21 lines]
>
> but couldn't get it to work... any ideas on this command?
As written you're asking for two return values but telling it to skip
the first and return only one.
You're also asking for a space between the two strings -- whether it
will ignore that or not I didn't test.
Lastly, the line above doesn't match the "title=value" format you asked
about to begin with. It looks like you may want to use the
'headerlines' option of textread().
Why are you doing it this way instead of reading the whole file, anyway?
If you want the names as well as the values, then
[n,b]=textread('yourfile.dat','%s%d','delimiter','=');
worked for a sample file of data as in your first posting...
doc textread
--
Markthomas - 14 Jul 2008 19:16 GMT
dpb <none@non.net> wrote in message
<g5g4lq$1ks$1@aioe.org>...
> > dpb <none@non.net> wrote in message <g5fo6p$au6
> > $1@aioe.org>...
[quoted text clipped - 43 lines]
>
> --
the main reason why i can't do the whole file that way is
because there are other data types in the structure of the
file. besides the numbers there is times, dates, and long
strings that have spaces... i wasn't sure which way to and
be most efficient
Markthomas
Donn Shull - 14 Jul 2008 22:54 GMT
One other tool you may want to consider is regexp.