comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » unformatted ascii data to arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
unformatted ascii data to arrays [message #21928] Mon, 09 October 2000 00:00
eeeyler is currently offline  eeeyler
Messages: 5
Registered: March 2000
Junior Member
I am trying to come up with some regular expressions to help me parse
through this data so it can be loaded into arrays.

The problem is this: String values may contain any character a user can
enter from a keyboard, including whitespace and double quotes in any
location within the string (even first or last character).

Some example (small data files):

Example 1.
real_1 integer_1 integer_2 string_1 real_2 string_2
lbs newtons none none kg none
1.3456 3 500 "a string" 500.2 "another string"
3.2 6 8 " yet another" 5.5 "another yet"
3.5 9 10 "more strings " 67.5 "why?"
6.7 1 5 " one more " 8.5 "I don't know!"

Example 2:
string_1 real_1 real_2 integer_1 string_2 integer_2
none lbs kg newtons none none
"a string" 1.356 500.2 8 "234" 342
" yet one more" 8.88 9.0 4 "sdfh" 13
"here's another " 98.0 3.5 123 "qiour>alkfj" 90
" end example 2 " 67.4 23.9 755 "mzxbv" 56

Example 3:
string_1 real_1 real_2 integer_1 integer_2 string_2
"hi" 12.3 45.6 7 8 "bye"
"am" 90.1 23.4 5 6 " I"
"making" 78.9 13.4 2 5 "sense? "
"please" 68.7 90.8 1 3 " help "


--
Thanks for talking!

Eric


Sent via Deja.com http://www.deja.com/
Before you buy.
[Message index]
 
Read Message
Previous Topic: Re: object oriented dilemma
Next Topic: Re: [Q]: ID analog to FORTRAN "sign" function

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:40:35 PDT 2025

Total time taken to generate the page: 0.71962 seconds