make strsplit not skip null between patterns [message #75193] |
Thu, 17 February 2011 14:59 |
Garfield
Messages: 2 Registered: February 2011
|
Junior Member |
|
|
Hi all,
I am trying to use strsplit to extract data from a string. the string
is like this:
RD|I|04|013|9997|43202|10|1|078|142|20070813|02:00|0.00000|| ||
ND|||||||||||.31806
I am using '|' as the pattern of separator, so the statement is "data
= strsplit(line,'|', count=n, /extract)". I do this for thousands of
lines. The problem for me is that there is not always an input between
a pair of '|', so the dimensions of the 'data' returned by IDL are not
constant. I don't want this because every input in between a pair of
'|' has different meaning. I want to make the dimension of 'data' to
be constant so that I can easily know the meaning of each input.
Need ideas! Thanks,
Zhen
|
|
|